diff --git a/closed/get_j9_source.sh b/closed/get_j9_source.sh index 8a6bebc724..c5754c82a7 100644 --- a/closed/get_j9_source.sh +++ b/closed/get_j9_source.sh @@ -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 @@ -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