2012-10-17 09:32:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# dist
|
|
|
|
# ----
|
|
|
|
# Copyright : (c) 2012, Jeremie Dimino <jeremie@dimino.org>
|
|
|
|
# Licence : BSD3
|
|
|
|
#
|
|
|
|
# Script to build the release
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Extract project parameters from _oasis
|
|
|
|
NAME=`oasis query Name 2> /dev/null`
|
|
|
|
VERSION=`oasis query Version 2> /dev/null`
|
|
|
|
PREFIX=$NAME-$VERSION
|
|
|
|
ARCHIVE=$(pwd)/$PREFIX.tar.gz
|
|
|
|
|
2013-03-10 16:51:58 +00:00
|
|
|
# Create a branch for the release
|
|
|
|
git checkout -b release-$VERSION
|
2012-10-17 09:32:11 +00:00
|
|
|
|
|
|
|
# Generate files
|
|
|
|
oasis setup
|
|
|
|
|
|
|
|
# Set release mode in the Makefile
|
2013-03-10 16:51:58 +00:00
|
|
|
sed 's/^SETUP := setup-dev.exe.*/SETUP := setup.exe/' Makefile > Makefile.new
|
|
|
|
mv Makefile.new Makefile
|
2012-10-17 09:32:11 +00:00
|
|
|
|
|
|
|
# Remove this script
|
|
|
|
rm -f dist
|
|
|
|
|
2013-03-10 16:51:58 +00:00
|
|
|
# Commit
|
|
|
|
git add --all --force
|
|
|
|
git commit -m "prepare release"
|
|
|
|
git tag $VERSION
|
|
|
|
|
|
|
|
git checkout master
|