-
Notifications
You must be signed in to change notification settings - Fork 3
/
tag_release
executable file
·50 lines (44 loc) · 1.22 KB
/
tag_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
#!/bin/sh -x
set -e
script_dir=$(dirname "$(readlink -f "$0")")
# Get settings
. "$script_dir/release_settings"
# directory to do the pull and build
TMPDIR=~/tmp/release/$version
TMPDIR=`readlink -m $TMPDIR`
for repo in $packages; do
eval 'repo_version=${'"${repo}_version"':-$version}'
cd "$TMPDIR/$repo"
git checkout master
git tag -F ../${repo}_notes_tag.txt --cleanup=verbatim -s ${repo_version}
git checkout develop
git fetch
git merge --no-ff --no-commit master || git mergetool
NEWS=NEWS
if [ -e NEWS.md ] ; then
NEWS=NEWS.md
fi
mv "$NEWS" "$NEWS"~
case $repo in
(htslib)
echo 'Noteworthy changes in release a.b' > "$NEWS"
echo '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' >> "$NEWS"
sed -i "/define *HTS_VERSION/s/[0-9][0-9]$/90/" htslib/hts.h
git add htslib/hts.h
;;
(samtools)
echo 'Release a.b' > "$NEWS"
echo '-----------' >> "$NEWS"
sed -i '/define BAM_VERSION/ s/"$/+"/' bam.h
git add bam.h
;;
(bcftools)
echo "## Release a.b" > "$NEWS"
;;
esac
echo >> "$NEWS"
cat "$NEWS"~ >> "$NEWS"
rm "$NEWS"~
git add "$NEWS"
git commit -m "Merge version number bump and $NEWS file from master"
done