-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintel-release.sh
59 lines (42 loc) · 1.43 KB
/
intel-release.sh
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
57
58
59
#!/bin/bash
set -o nounset
set -o errexit
source "$(dirname "${BASH_SOURCE}")/tools/env_setup.sh"
TEMPDIR=$(mktemp -d)
cd $TEMPDIR
echo $TEMPDIR
git clone $SNIPER_ROOT graphite
cd $TEMPDIR/graphite
SNIPER_ROOT_ORIG=$SNIPER_ROOT
SNIPER_ROOT=$(pwd)
git checkout intel
LASTTAG=$(git describe --abbrev=0 --tags)
git log $LASTTAG.. || true
NAME=$(date '+%Y-%m-%d-%H-%M-%S')
echo "intel-$NAME" >$TEMPDIR/commit.msg.init
echo " * " >>$TEMPDIR/commit.msg.init
cp $TEMPDIR/commit.msg.init $TEMPDIR/commit.msg
[ -z $EDITOR ] && EDITOR=nano
$EDITOR $TEMPDIR/commit.msg
if diff -bBq $TEMPDIR/commit.msg.init $TEMPDIR/commit.msg; then echo "No changes??"; exit -1; fi
echo "Committing using changelog entry"
cat $TEMPDIR/commit.msg
sleep 5
git tag intel-$NAME intel
git push origin intel-$NAME
git commit --allow-empty -F $TEMPDIR/commit.msg
git push
(cd $SNIPER_ROOT_ORIG && git push -u origin intel-$NAME)
cd $TEMPDIR
git clone ssh://atuin/afs/elis.ugent.be/group/csl/perflab/exascience/src/sniper-intel.git
cd $TEMPDIR/sniper-intel
# Remove all existing files so we can detect deletions
rm -rf *
FILES="common COMPILATION config CHANGELOG Doxyfile \
include LICENSE LICENSE.interval Makefile.external Makefile.config NOTICE \
pin README run-sniper record-trace scripts sift standalone test tools"
(cd $SNIPER_ROOT && git archive intel) | tar x $FILES
mv Makefile.external Makefile
git add --all
git commit -F $TEMPDIR/commit.msg
git push origin