forked from kunquat/kunquat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·38 lines (24 loc) · 866 Bytes
/
Copy pathrelease.sh
File metadata and controls
executable file
·38 lines (24 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
VERSION=0.9.4
RELEASE=kunquat-$VERSION
set -e
# Make sure there are no local changes
# (required for the version substitution below to work correctly)
if [ -n "$(git diff)" ] || [ -n "$(git diff --cached)" ]
then
echo ""
echo "Cannot make a release package because of local changes."
echo ""
exit 1
fi
# Make version definitions for library and tracker
version_lib_path="src/include/kunquat/version_def.h"
version_tracker_path="kunquat/tracker/version.py"
echo "#define KQT_VERSION \"$VERSION\"" > $version_lib_path
echo "KUNQUAT_VERSION = '$VERSION'" > $version_tracker_path
# Create release package
ver_stash=`git stash create`; git archive -o $RELEASE.tar.gz --prefix=$RELEASE/ ${ver_stash:-HEAD}
# Restore original version files from the repository
git checkout $version_lib_path
git checkout $version_tracker_path
exit 0