Skip to content

Commit

Permalink
Modify get_source.sh to automatically fetch release branches
Browse files Browse the repository at this point in the history
If the current branch matches the pattern of a release branch, fetch
openj9/omr branches of the same name.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
  • Loading branch information
pshipton committed Sep 13, 2023
1 parent f399997 commit 8fa6357
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions closed/get_j9_source.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

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

git_urls[openj9]=https://github.com/eclipse-openj9/openj9
branches[openj9]=master

git_urls[omr]=https://github.com/eclipse-openj9/openj9-omr
branches[omr]=openj9

currentbranch=$(git rev-parse --abbrev-ref HEAD)
if [[ "$currentbranch" =~ v[0-9]+\.[0-9]+(\.[0-9]+)?-release ]] ; then
branches[openj9]=$currentbranch
branches[omr]=$currentbranch
else
branches[openj9]=master
branches[omr]=openj9
fi

pflag=false

Expand Down

0 comments on commit 8fa6357

Please sign in to comment.