[RELEASE_ENGINEERING] Adapt the Release Engineering scripts to Git.

svn path=/trunk/Release_Engineering/; revision=2358
This commit is contained in:
Colin Finck 2017-10-01 12:20:36 +00:00
parent d2cc134a83
commit 304a2a7675
3 changed files with 31 additions and 24 deletions

View File

@ -4,10 +4,13 @@
# Sanity checks
if [ "$ROS_ARCH" = "" ]; then
echo "Please run this script inside RosBE!"
exit 1
echo "Please run this script inside RosBE!"
exit 1
fi
# Constants
REPODIR="$PWD/Release_WorkDir/Repo"
echo "*******************************************************************************"
echo "* ReactOS Release Engineering Scripts *"
echo "*******************************************************************************"
@ -22,14 +25,30 @@ done
# Ask for the branch name
while [ "$branch_name" = "" ]; do
echo "What is the name of the SVN branch? (e.g. \"ros-branch-0_4_0\")"
echo "What is the name of the Git branch? (e.g. \"ros-branch-0_4_0\")"
read branch_name
echo
done
# Write the config file
echo "version=${version}" > Release_Config
echo "REPODIR=${REPODIR}" > Release_Config
echo "version=${version}" >> Release_Config
echo "branch_name=${branch_name}" >> Release_Config
echo "Configuration file written!"
# Check out the Git repository
if [ -d "${REPODIR}/.git" ]; then
cd "${REPODIR}" || exit 1
git clean -d -f -f -x || exit 1
git checkout "${branch_name}" || exit 1
git remote set-url origin git://git.reactos.org/reactos.git || exit 1
git fetch origin || exit 1
git reset --hard "origin/${branch_name}" || exit 1
else
rm -rf "${REPODIR}"
git clone git://git.reactos.org/reactos.git "${REPODIR}" || exit 1
cd "${REPODIR}" || exit 1
git checkout "${branch_name}" || exit 1
fi
echo "Release configured!"
echo "Now you can use the other Release_* commands to create the packages."

View File

@ -15,7 +15,6 @@ fi
# Constants
ROOTDIR="$PWD"
WORKDIR="$PWD/Release_WorkDir/ISOs"
OUTPUTDIR="output-MinGW-i386"
BOOTCDISO="ReactOS-${version}.iso"
BOOTCDZIP="ReactOS-${version}-iso.zip"
@ -25,15 +24,10 @@ 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
# Download the "optional" folder from svn.reactos.org
mkdir "${WORKDIR}/modules/optional" || exit 1
cd "${WORKDIR}/modules/optional" || exit 1
mkdir "${REPODIR}/modules/optional" || exit 1
cd "${REPODIR}/modules/optional" || exit 1
wget --recursive --level=1 --no-directories --no-parent --execute robots=off "https://svn.reactos.org/optional" || exit 1
# Check that all mandatory files exist in the "optional" folder.
@ -41,9 +35,9 @@ test -f "DroidSansFallback.ttf" || (echo "DroidSansFallback CJK font missing!" &
test -f "wine_gecko*.msi" || (echo "wine_gecko MSI package missing!" && exit 1)
# Build ReactOS
cd "${WORKDIR}" || exit 1
./configure.sh || exit 1
cd "${WORKDIR}/${OUTPUTDIR}/reactos" || exit 1
cd "${REPODIR}" || exit 1
./configure.sh -DENABLE_ROSAPPS=1 -DENABLE_WALLPAPERS=1 || exit 1
cd "${REPODIR}/${OUTPUTDIR}/reactos" || exit 1
ninja bootcd || exit 1
ninja livecd || exit 1

View File

@ -15,21 +15,15 @@ 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}"
cd "${REPODIR}"
git archive --format=zip --prefix="${EXPORTDIR}/" -9 --output="${ROOTDIR}/${SOURCEZIP}" "${branch_name}" || exit 1
# We're done!
echo