forked from ocaml/ocamlfind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease
executable file
·40 lines (33 loc) · 875 Bytes
/
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
#! /bin/sh
set -e
version=`./configure -version 2>/dev/null`
destdir="findlib-$version"
mkdir -p packages
rm -rf "packages/$destdir"
makepkg -spec findlib.files -intree . -outtree "packages/$destdir"
(cd packages; tar czf "$destdir.tar.gz" "$destdir")
echo "Wrote packages/$destdir.tar.gz"
# Checking git:
master="$(git branch | grep '* master')"
if [ -z "$master" ]; then
echo "Error: not on master branch"
exit 1
fi
status="$(git status -uno -s)"
if [ -n "$status" ]; then
echo "Error: git status not clean"
exit 1
else
printf "Tag revision (y/n)? "
read answer
case "$answer" in
y|Y|yes|YES)
git tag -a -m "findlib-$version" findlib-$version
git push --tags origin master
echo "New tag: findlib-$version"
;;
*)
echo "Nothing tagged."
;;
esac
fi