Skip to content

Commit

Permalink
add the relase creation script
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcima committed May 11, 2018
1 parent 6570739 commit 79b1c0e
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions scripts/create-master-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
set -e
set -x

version=$1

if [ -z "$version" ]; then
echo "Package version not given." 1>&2
exit 1
fi
if [ -e "work" ]; then
echo "Delete the work directory first." 1>&2
exit 1
fi

mkdir work
cd work

git clone .. adljack
git checkout master

cd adljack
git submodule--helper list | awk '{ print $4 }' | \
while read submodule; do
git config --file .gitmodules submodule."$submodule".url "../../$submodule"
done
git submodule init
git submodule update

find . -name '.git*' -print0 | xargs -0 rm -rf

cd ..
mv adljack adljack-"$version"

tar cvf adljack-"$version".tar adljack-"$version"
gzip -9 adljack-"$version".tar

mkdir adljack-win32
cd adljack-win32
i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DPREFER_PDCURSES=ON -DENABLE_VIRTUALMIDI=ON ../adljack-"$version"
i686-w64-mingw32-cmake --build .
cpack -G NSIS .
cpack -G ZIP .
mv ADLjack-"$version"-win32.exe ../
mv ADLjack-"$version"-win32.zip ../

cd ..

mkdir adljack-win64
cd adljack-win64
x86_64-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DPREFER_PDCURSES=ON -DENABLE_VIRTUALMIDI=ON ../adljack-"$version"
x86_64-w64-mingw32-cmake --build .
cpack -G NSIS .
cpack -G ZIP .
mv ADLjack-"$version"-win64.exe ../
mv ADLjack-"$version"-win64.zip ../

0 comments on commit 79b1c0e

Please sign in to comment.