From fe4b0adb3299236146075629e3390e452bfbb912 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sun, 29 Nov 2015 02:03:41 +0000 Subject: [PATCH] [RELEASE_ENGINEERING] Add a set of scripts to fully automate our Building and Packaging process for ReactOS Releases. This ensures we always start from a 100% clean environment, all required modules are added and each command is run with the right parameters. Inspired by https://www.jitbit.com/alexblog/249-now-thats-what-i-call-a-hacker/ :) TODO: I don't have a solution for the VM packages and optional modules yet. Also the wallpapers module needs some cleanup or it will bloat the packages. svn path=/trunk/Release_Engineering/; revision=2256 --- Release_Configure | 35 ++++++++++++++++++++++++++++++ Release_ISOs | 55 +++++++++++++++++++++++++++++++++++++++++++++++ Release_Source | 41 +++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100755 Release_Configure create mode 100755 Release_ISOs create mode 100755 Release_Source diff --git a/Release_Configure b/Release_Configure new file mode 100755 index 0000000..c302b2a --- /dev/null +++ b/Release_Configure @@ -0,0 +1,35 @@ +#!/bin/bash +# ReactOS Release Engineering Scripts +# Release_Configure - Set up a release configuration. First script to execute! + +# Sanity checks +if [ "$ROS_ARCH" = "" ]; then + echo Please run this script inside RosBE! + exit 1 +fi + +echo "*******************************************************************************" +echo "* ReactOS Release Engineering Scripts *" +echo "*******************************************************************************" +echo + +# Ask for the version +while [ "$version" = "" ]; do + echo What ReactOS version number do you want to release? + read version + echo +done + +# Ask for the branch name +while [ "$branch_name" = "" ]; do + echo What is the name of the SVN branch? + read branch_name + echo +done + +# Write the config file +echo "version=${version}" > Release_Config +echo "branch_name=${branch_name}" >> Release_Config + +echo "Configuration file written!" +echo "Now you can use the other Release_* commands to create the packages." diff --git a/Release_ISOs b/Release_ISOs new file mode 100755 index 0000000..e19a86f --- /dev/null +++ b/Release_ISOs @@ -0,0 +1,55 @@ +#!/bin/bash +# ReactOS Release Engineering Scripts +# Release_ISOs - Create the "-iso.zip" and "-live.zip" packages + +# Sanity checks +if ! source ./Release_Config; then + echo Please run Release_Configure first! + exit 1 +fi + +if [ "$ROS_ARCH" = "" ]; then + echo Please run this script inside RosBE! + exit 1 +fi + +# Constants +ROOTDIR="$PWD" +WORKDIR="$PWD/Release_WorkDir/ISOs" +OUTPUTDIR="output-MinGW-i386" +BOOTCDISO="ReactOS-${version}.iso" +BOOTCDZIP="ReactOS-${version}-iso.zip" +LIVECDISO="ReactOS-${version}-Live.iso" +LIVECDZIP="ReactOS-${version}-live.zip" + +# Start from a clean state +rm -f "${ROOTDIR}/${BOOTCDZIP}" +rm -f "${ROOTDIR}/${LIVECDZIP}" +rm -rf "${WORKDIR}" +mkdir -p "${WORKDIR}" +svn co "https://svn.reactos.org/reactos/branches/${branch_name}/reactos" "${WORKDIR}" || exit 1 +svn co "https://svn.reactos.org/reactos/branches/${branch_name}/rosapps" "${WORKDIR}/modules/rosapps" || exit 1 +svn co "https://svn.reactos.org/reactos/branches/${branch_name}/wallpapers" "${WORKDIR}/modules/wallpapers" || exit 1 + +# Build ReactOS +cd "${WORKDIR}" || exit 1 +./configure.sh || exit 1 +cd "${WORKDIR}/${OUTPUTDIR}/reactos" || exit 1 +ninja bootcd || exit 1 +ninja livecd || exit 1 + +# Create the ZIP packages +mv "bootcd.iso" "${BOOTCDISO}" || exit 1 +zip "${ROOTDIR}/${BOOTCDZIP}" "${BOOTCDISO}" || exit 1 +mv "livecd.iso" "${LIVECDISO}" || exit 1 +zip "${ROOTDIR}/${LIVECDZIP}" "${LIVECDISO}" || exit 1 + +# We're done! +echo +echo "*******************************************************************************" +echo "Successfully created the following packages:" +echo +echo " - ${BOOTCDZIP}" +echo " - ${LIVECDZIP}" +echo "*******************************************************************************" +echo diff --git a/Release_Source b/Release_Source new file mode 100755 index 0000000..9abd02c --- /dev/null +++ b/Release_Source @@ -0,0 +1,41 @@ +#!/bin/bash +# ReactOS Release Engineering Scripts +# Release_Source - Create the "-src.zip" package + +# Sanity checks +if ! source ./Release_Config; then + echo Please run Release_Configure first! + exit 1 +fi + +if [ "$ROS_ARCH" = "" ]; then + echo Please run this script inside RosBE! + exit 1 +fi + +# Constants +ROOTDIR="$PWD" +WORKDIR="$PWD/Release_WorkDir/Source" +EXPORTDIR="ReactOS-${version}" +SOURCEZIP="ReactOS-${version}-src.zip" + +# Start from a clean state +rm -f "${ROOTDIR}/${SOURCEZIP}" +rm -rf "${WORKDIR}" +mkdir -p "${WORKDIR}" +svn export "https://svn.reactos.org/reactos/branches/${branch_name}/reactos" "${WORKDIR}/${EXPORTDIR}" || exit 1 +svn export "https://svn.reactos.org/reactos/branches/${branch_name}/rosapps" "${WORKDIR}/${EXPORTDIR}/modules/rosapps" || exit 1 +svn export "https://svn.reactos.org/reactos/branches/${branch_name}/wallpapers" "${WORKDIR}/${EXPORTDIR}/modules/wallpapers" || exit 1 + +# Create the ZIP package +cd "${WORKDIR}" +zip -r "${ROOTDIR}/${SOURCEZIP}" "${EXPORTDIR}" + +# We're done! +echo +echo "*******************************************************************************" +echo "Successfully created the following packages:" +echo +echo " - ${SOURCEZIP}" +echo "*******************************************************************************" +echo