diff --git a/scripts/create_release.sh b/scripts/create_release.sh index d5df3237a..28511013b 100644 --- a/scripts/create_release.sh +++ b/scripts/create_release.sh @@ -9,33 +9,32 @@ read version echo -n "What kind of distribution (e.g. production, trial) ? " read distribution -destdir=aseprite-release-$version +destdir=$(pwd)/aseprite-release-$version # -------------------------- # Clone the local repository # -------------------------- -if [ ! -d $destdir ] ; then - git clone --depth=1 $srcdir $destdir +if [ ! -d "$destdir" ] ; then + git clone --depth=1 "$srcdir" "$destdir" fi # -------------- # Update version # -------------- -cd $destdir/scripts +cd "$destdir/scripts" sh update_version.sh $version -cd .. # ---------------------------------------------- # Make a build/ directory and compile with cmake # ---------------------------------------------- -if [ ! -d build ] ; then - mkdir build - cd build +if [ ! -d "$destdir/build" ] ; then + mkdir "$destdir/build" + cd "$destdir/build" if [ "$distribution" == "production" ]; then - echo cmake \ + cmake \ -D "CMAKE_BUILD_TYPE:STRING=RelWithDebInfo" \ -D "CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \ -D "CMAKE_C_FLAGS_RELWITHDEBINFO:STRING = /Zi /MT /O2 /Ob1 /D NDEBUG" \ @@ -52,25 +51,24 @@ if [ ! -d build ] ; then -G "Ninja" \ .. fi - cd .. fi # ------- # Compile # ------- -if [ ! -f aseprite.exe ] ; then - cd build +if [ ! -f "$destdir/aseprite.exe" ] ; then + cd "$destdir/build" ninja aseprite - cd src + + cd "$destdir/build/src" signexe aseprite.exe - cp aseprite.exe ../.. - cd ../.. + cp aseprite.exe "$destdir" fi # --------------- # Create packages # --------------- -cd scripts +cd "$destdir/scripts" sh create_packages.sh