-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn bip-take-snapshot to a bip-release script.
- Loading branch information
1 parent
b9b4917
commit 8827476
Showing
2 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -d src ] ; then | ||
echo "Please run me in bip sources root." >&2 | ||
exit 1 | ||
fi | ||
|
||
release="$1" | ||
|
||
if [ -n "$release" ] | ||
then | ||
echo '#define BIP_VERSION "'$release'"' > src/version.h | ||
git commit -a -m "Update src/version.h for release." | ||
git tag release-$release | ||
prefix=bip-$release | ||
else | ||
prefix=bip-$(date +%y%m%d) | ||
fi | ||
|
||
olddir=$(pwd) | ||
tmpdir=$(mktemp -d /var/tmp/bip-XXXXX) | ||
git-archive --format=tar --prefix=$prefix/ HEAD > $tmpdir/$prefix.tar | ||
cd $tmpdir | ||
tar xf $prefix.tar | ||
cd $prefix | ||
./bootstrap | ||
cd .. | ||
tar czf $olddir/../$prefix.tar.gz $prefix | ||
cd $olddir | ||
rm -rf $tmpdir | ||
echo "See ../$prefix.tar.gz" | ||
|
||
if [ -n "$release" ] | ||
then | ||
echo '#define BIP_VERSION "'$release'-git"' > src/version.h | ||
git tag release-$release | ||
git commit -a -m "Add -git to version string." | ||
fi |
This file was deleted.
Oops, something went wrong.