forked from chris2511/xca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit.release
executable file
·56 lines (46 loc) · 1.17 KB
/
git.release
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
set -e
type git || exit 1
test -s VERSION && test -s changelog && test -d ../qt
export TVERSION="$1"
commit=master
test -z "$2" || commit="$2"
if test -z "$TVERSION"; then
echo "usage: $0 <VERSION> [commit]"
echo " if commit is ommitted, 'master' is used"
exit 1
fi
if ! git diff-index --quiet HEAD --; then
echo "You have local changes, please commit, reset or stash them"
exit 1
fi
! git grep -q "^xca $TVERSION " changelog
! git grep -q "$TVERSION" VERSION
echo "$TVERSION" > VERSION
(
LANG=C date +"xca $TVERSION %a %b %d %Y"
echo
cat changelog
) > changelog.new
mv changelog.new changelog
git commit VERSION changelog -m "Prepare XCA $TVERSION"
git tag -a "RELEASE.$TVERSION" -m "Release version $TVERSION"
# Create the tar.gz
make dist
releasedir="$HOME/xca-$TVERSION"
mkdir -p "$releasedir"
cp xca-$TVERSION.tar.gz "$releasedir"
(
cd ..
tar zxf "$releasedir/xca-$TVERSION.tar.gz"
mkdir -p "xca-$TVERSION/BUILD" && cd "xca-$TVERSION/BUILD"
../configure && make -j7
mkdir "$releasedir/doc"
cp doc/*.html "$releasedir/doc"
)
(
cd ..
"./xca-$TVERSION/misc/build-w32.sh"
cp "setup_xca-${TVERSION}.exe" "$releasedir"
)
ls -la "$releasedir"