From 0a2b3744d3efa6fec37ffcf512d89cc23b8bc8bc Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Wed, 15 Mar 2017 15:31:55 +0100 Subject: [PATCH 1/2] Fix release.sh script Make it add vendor to the tarball and just be a generally nicer script with less verbose output and no abaility to wipe my working copies .git folder when executed in the wrong dir. I plan on using this to create tarballs that can be used for the rpmbuild process without the build box needing to run composer and connect to the internet. The openSUSE Build Service boxen do not have a connection to the internet during builds. --- dev_tools/release/release.sh | 60 +++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/dev_tools/release/release.sh b/dev_tools/release/release.sh index 4ca00c19e..55cc5335e 100755 --- a/dev_tools/release/release.sh +++ b/dev_tools/release/release.sh @@ -1,11 +1,15 @@ #!/bin/bash -e #release.sh 1.8.2 -#creates an airtime folder with a "1.8.2" suffix +#creates a libretime folder with a "1.8.2" suffix #creates tarballs with a "1.8.2" suffix #release.sh 1.8.2 RC -#creates an airtime folder with a "1.8.2" suffix +#creates a libretime folder with a "1.8.2-RC" suffix +#creates tarballs with a "1.8.2-RC" suffix + +#release.sh 1.8.2-RC +#creates a libretime folder with a "1.8.2-RC" suffix #creates tarballs with a "1.8.2-RC" suffix if [ $# == 0 ]; then @@ -22,32 +26,58 @@ fi dir=$(dirname $(readlink -f $0)) gitrepo=$(readlink -f ./../../) -echo "Creating tarballs with ${suffix} suffix" +echo ${gitrepo} -target=/tmp/airtime-${version} -target_file=/tmp/airtime-${suffix}.tar.gz +echo "Creating tarball for LibreTime ${suffix}." + +target=/tmp/libretime-${suffix} +target_file=/tmp/libretime-${suffix}.tar.gz rm -rf $target rm -f $target_file -git clone file://$gitrepo $target +echo -n "Cloning temporary git repo..." +git clone --quiet --depth=1 file://$gitrepo $target +echo " Done" -cd $target +echo -n "Creating VERSION file for ${suffix}..." +echo -n "${suffix}" > ${target}/VERSION +echo " Done" -echo "Checking out tag airtime-${suffix}" -git checkout airtime-${suffix} +pushd $target +echo -n "Checking out tag ${suffix}..." +git checkout --quiet ${suffix} +echo " Done" -cd $target -rm -rf .git .gitignore .gitmodules .zfproject.xml dev_tools/ audio_samples/ +echo -n "Running composer install..." +composer install --quiet --no-dev +echo " Done" -#echo "Minimizing Airtime Javascript files..." +popd + +#echo "Minimizing LibreTime Javascript files..." #cd $dir #find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \; #find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \; #echo "Done" -#zip -r airtime-${suffix}.zip airtime-${version} -cd /tmp/ -tar -czf $target_file airtime-${version} +pushd /tmp/ +echo -n "Creating tarball..." +tar -czf $target_file \ + --owner=root --group=root \ + --exclude-vcs \ + --exclude .zfproject.xml \ + --exclude .gitignore \ + --exclude .travis.yml \ + --exclude travis \ + --exclude mkdocs.yml \ + --exclude dev_tools \ + --exclude docs \ + --exclude vendor/phing \ + --exclude vendor/simplepie/simplepie/tests \ + libretime-${suffix} +echo " Done" +popd + echo "Output file available at $target_file" From 1c3d8b57f4badad743bf5a5ed32f5b75860700ef Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Wed, 15 Mar 2017 17:07:52 +0100 Subject: [PATCH 2/2] Fix tag checkout during release --- dev_tools/release/release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev_tools/release/release.sh b/dev_tools/release/release.sh index 55cc5335e..ad559e67a 100755 --- a/dev_tools/release/release.sh +++ b/dev_tools/release/release.sh @@ -46,7 +46,8 @@ echo " Done" pushd $target echo -n "Checking out tag ${suffix}..." -git checkout --quiet ${suffix} +git fetch --quiet --tags +git checkout --quiet tags/${suffix} echo " Done" echo -n "Running composer install..."