2015-10-21 19:46:24 +00:00
#!/usr/bin/env bash
SOURCE = " ${ BASH_SOURCE [0] } "
while [ -h " $SOURCE " ] ; do # resolve $SOURCE until the file is no longer a symlink
DIR = " $( cd -P " $( dirname " $SOURCE " ) " && pwd ) "
SOURCE = " $( readlink " $SOURCE " ) "
[ [ $SOURCE != /* ] ] && SOURCE = " $DIR / $SOURCE " # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR = " $( cd -P " $( dirname " $SOURCE " ) " && pwd ) "
2015-11-11 01:30:01 +00:00
REPOROOT = " $( cd -P " $DIR /../.. " && pwd ) "
2015-11-11 21:37:55 +00:00
2015-11-11 01:30:01 +00:00
source " $DIR /../_common.sh "
2015-11-11 21:37:55 +00:00
2015-10-23 18:10:47 +00:00
echo "Starting packaging"
if [ -z " $DOTNET_BUILD_VERSION " ] ; then
TIMESTAMP = $( date "+%Y%m%d%H%M%S" )
export DOTNET_BUILD_VERSION = 0.0.1-alpha-t$TIMESTAMP
echo " Version: $DOTNET_BUILD_VERSION "
fi
2015-10-21 19:46:24 +00:00
2015-11-11 21:37:55 +00:00
COMMIT = $( git rev-parse HEAD)
2015-11-11 23:33:45 +00:00
echo $COMMIT > $STAGE2_DIR /.version
echo $DOTNET_BUILD_VERSION >> $STAGE2_DIR /.version
2015-11-11 21:37:55 +00:00
2015-10-21 20:01:36 +00:00
# Create Dnvm Package
$DIR /package-dnvm.sh
2015-10-20 16:05:17 +00:00
2015-11-11 01:30:01 +00:00
if [ [ " $UNAME " = = "Linux" ] ] ; then
2015-10-22 22:12:49 +00:00
# Create Debian package
$DIR /package-debian.sh
2015-11-11 01:30:01 +00:00
elif [ [ " $UNAME " = = "Darwin" ] ] ; then
# Create OSX PKG
$DIR /../../packaging/osx/package-osx.sh
2015-10-22 22:12:49 +00:00
fi
2015-10-23 18:10:47 +00:00