2012-09-18 18:34:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-09-17 21:14:55 +00:00
|
|
|
echo "Making $(pwd) the current release:"
|
2012-04-28 00:11:39 +00:00
|
|
|
cwd=$(pwd)
|
2012-09-18 18:34:31 +00:00
|
|
|
echo -n " - Determining version: "
|
|
|
|
if [ -f $cwd/dependency_manifest.git ]; then
|
|
|
|
VERSION=`cat $cwd/dependency_manifest.git | awk '/^-/ { print $NF }'`
|
|
|
|
else
|
|
|
|
VERSION="$(git describe --tags)-$(git branch | grep '*' | awk '{print $2}')"
|
|
|
|
fi
|
|
|
|
echo $VERSION
|
2012-04-28 00:11:39 +00:00
|
|
|
cd /tmp/rt
|
2012-09-17 21:14:55 +00:00
|
|
|
echo " - Resetting existing /tmp/rt"
|
|
|
|
git reset HEAD --hard > /dev/null 2>&1
|
|
|
|
git clean -fd > /dev/null 2>&1
|
|
|
|
echo " - Removing and recreating /tmp/rt/current"
|
2012-04-28 00:11:39 +00:00
|
|
|
rm -rf /tmp/rt/current
|
|
|
|
mkdir /tmp/rt/current
|
|
|
|
cd $cwd
|
2012-09-17 21:14:55 +00:00
|
|
|
echo " - Copying devrel to /tmp/rt/current"
|
2012-04-28 00:11:39 +00:00
|
|
|
cp -a dev /tmp/rt/current
|
2012-09-18 18:34:31 +00:00
|
|
|
echo " - Writing /tmp/rt/current/VERSION"
|
|
|
|
echo $VERSION > /tmp/rt/current/VERSION
|
2012-04-28 00:11:39 +00:00
|
|
|
cd /tmp/rt
|
2012-09-17 21:14:55 +00:00
|
|
|
echo " - Reinitializing git state"
|
2012-04-28 00:11:39 +00:00
|
|
|
git add .
|
2012-09-17 21:14:55 +00:00
|
|
|
git commit -a -m "riak_test init" --amend > /dev/null 2>&1
|
|
|
|
echo "Done!"
|