40
40
esac
41
41
done
42
42
43
- # Check if the tags already exist and delete them if they do
44
- if git rev-parse -q --verify " refs/tags/after_debug" > /dev/null; then
45
- git tag -d after_debug
46
- fi
47
-
48
- if git rev-parse -q --verify " refs/tags/before_debug" > /dev/null; then
49
- git tag -d before_debug
50
- fi
51
-
52
- # Tag the last commit as 'after_debug'
53
- git tag after_debug HEAD
54
- echo " Tagged the latest commit as 'after_debug'"
43
+ # Retrieve last two commit hashes
44
+ before_debug=$( git rev-parse HEAD~1)
45
+ after_debug=$( git rev-parse HEAD)
55
46
56
- # Tag the second last commit as 'before_debug'
57
- git tag before_debug HEAD~1
58
- echo -e " Tagged the previous commit as ' before_debug'\n "
47
+ # Tag the last two commits if they are not already tagged
48
+ git tag -f after_debug $after_debug
49
+ git tag -f before_debug $ before_debug
59
50
60
51
# Print the before and after tags with their messages
61
52
git tag -n | grep -E ' before_debug|after_debug' | while IFS= read -r line; do echo " $line " ; done ; echo " "
@@ -64,12 +55,13 @@ git tag -n | grep -E 'before_debug|after_debug' | while IFS= read -r line; do ec
64
55
if [ " $advection " == true ]; then
65
56
# Set the benchmark script for advection
66
57
benchmark_script=" benchmark/benchmarks_advection.jl"
67
- command=" benchpkg --rev=before_debug,after_debug \
58
+ command=" benchpkg --rev=$ before_debug ,$ after_debug \
68
59
-s $benchmark_script \
60
+ --bench-on=$after_debug \
69
61
--exeflags=\" --threads=$threads \" "
70
62
else
71
- command=" benchpkg --rev=before_debug,after_debug \
72
- --bench-on=after_debug \
63
+ command=" benchpkg --rev=$ before_debug ,$ after_debug \
64
+ --bench-on=$ after_debug \
73
65
--exeflags=\" --threads=$threads \" "
74
66
fi
75
67
0 commit comments