Skip to content

Commit a077bc8

Browse files
authored
Merge pull request #259 from pshipton/relbranch
Modify get_source.sh to automatically fetch release branches
2 parents e3ef5f3 + bfaa63d commit a077bc8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

closed/get_j9_source.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# ===========================================================================
4-
# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved
4+
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
55
# ===========================================================================
66
#
77
# This code is free software; you can redistribute it and/or modify it
@@ -57,10 +57,16 @@ declare -A shas
5757
declare -A references
5858

5959
git_urls[openj9]=https://github.com/eclipse-openj9/openj9
60-
branches[openj9]=master
61-
6260
git_urls[omr]=https://github.com/eclipse-openj9/openj9-omr
63-
branches[omr]=openj9
61+
62+
currentbranch=$(git rev-parse --abbrev-ref HEAD)
63+
if [[ "$currentbranch" =~ v[0-9]+\.[0-9]+(\.[0-9]+)?-release ]] ; then
64+
branches[openj9]=$currentbranch
65+
branches[omr]=$currentbranch
66+
else
67+
branches[openj9]=master
68+
branches[omr]=openj9
69+
fi
6470

6571
pflag=false
6672

0 commit comments

Comments
 (0)