aseprite/scripts/create_release.sh

77 lines
1.9 KiB
Bash
Raw Normal View History

2012-02-15 01:35:28 +00:00
#! /bin/sh
echo -n "Where is Aseprite source code? "
read srcdir
2012-02-15 01:35:28 +00:00
echo -n "What version to release (e.g. 0.9.1-beta) ? "
read version
echo -n "What kind of distribution (e.g. production, trial) ? "
read distribution
2012-02-15 01:35:28 +00:00
destdir=aseprite-release-$version
# --------------------------
# Clone the local repository
# --------------------------
if [ ! -d $destdir ] ; then
git clone --depth=1 $srcdir $destdir
2012-02-15 01:35:28 +00:00
fi
# --------------
# Update version
# --------------
cd $destdir/scripts
sh update_version.sh $version
2012-08-24 01:29:40 +00:00
cd ..
2012-02-15 01:35:28 +00:00
# ----------------------------------------------
# Make a build/ directory and compile with cmake
# ----------------------------------------------
if [ ! -d build ] ; then
mkdir build
cd build
if [ "$distribution" == "production" ]; then
echo 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" \
-D "CMAKE_EXE_LINKER_FLAGS:STRING = /MACHINE:X86 /SUBSYSTEM:WINDOWS,5.01" \
-G "Ninja" \
..
elif [ "$distribution" == "trial" ]; then
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" \
-D "CMAKE_EXE_LINKER_FLAGS:STRING = /MACHINE:X86 /SUBSYSTEM:WINDOWS,5.01" \
-D "ENABLE_TRIAL_MODE:BOOL=ON" \
-G "Ninja" \
..
fi
2012-02-15 01:35:28 +00:00
cd ..
fi
# -------
# Compile
# -------
if [ ! -f aseprite.exe ] ; then
cd build
ninja aseprite
cd src
aseprite-sign aseprite.exe
cp aseprite.exe ../..
cd ../..
2012-02-15 01:35:28 +00:00
fi
# ---------------
# Create packages
# ---------------
2012-05-21 00:00:44 +00:00
cd scripts
sh create_packages.sh