Merge pull request #87 from radiorabe/feature/fix-release-script
Fix release.sh script
This commit is contained in:
commit
c7187f997f
|
@ -1,11 +1,15 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
#release.sh 1.8.2
|
#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
|
#creates tarballs with a "1.8.2" suffix
|
||||||
|
|
||||||
#release.sh 1.8.2 RC
|
#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
|
#creates tarballs with a "1.8.2-RC" suffix
|
||||||
|
|
||||||
if [ $# == 0 ]; then
|
if [ $# == 0 ]; then
|
||||||
|
@ -22,32 +26,59 @@ fi
|
||||||
dir=$(dirname $(readlink -f $0))
|
dir=$(dirname $(readlink -f $0))
|
||||||
gitrepo=$(readlink -f ./../../)
|
gitrepo=$(readlink -f ./../../)
|
||||||
|
|
||||||
echo "Creating tarballs with ${suffix} suffix"
|
echo ${gitrepo}
|
||||||
|
|
||||||
target=/tmp/airtime-${version}
|
echo "Creating tarball for LibreTime ${suffix}."
|
||||||
target_file=/tmp/airtime-${suffix}.tar.gz
|
|
||||||
|
target=/tmp/libretime-${suffix}
|
||||||
|
target_file=/tmp/libretime-${suffix}.tar.gz
|
||||||
|
|
||||||
rm -rf $target
|
rm -rf $target
|
||||||
rm -f $target_file
|
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}"
|
pushd $target
|
||||||
git checkout airtime-${suffix}
|
|
||||||
|
|
||||||
|
echo -n "Checking out tag ${suffix}..."
|
||||||
|
git fetch --quiet --tags
|
||||||
|
git checkout --quiet tags/${suffix}
|
||||||
|
echo " Done"
|
||||||
|
|
||||||
cd $target
|
echo -n "Running composer install..."
|
||||||
rm -rf .git .gitignore .gitmodules .zfproject.xml dev_tools/ audio_samples/
|
composer install --quiet --no-dev
|
||||||
|
echo " Done"
|
||||||
|
|
||||||
#echo "Minimizing Airtime Javascript files..."
|
popd
|
||||||
|
|
||||||
|
#echo "Minimizing LibreTime Javascript files..."
|
||||||
#cd $dir
|
#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 bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \;
|
||||||
#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
|
#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \;
|
||||||
#echo "Done"
|
#echo "Done"
|
||||||
|
|
||||||
#zip -r airtime-${suffix}.zip airtime-${version}
|
pushd /tmp/
|
||||||
cd /tmp/
|
echo -n "Creating tarball..."
|
||||||
tar -czf $target_file airtime-${version}
|
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"
|
echo "Output file available at $target_file"
|
||||||
|
|
Loading…
Reference in New Issue