diff --git a/.github/release.sh b/.github/release.sh index b93bee72..0e0637ca 100755 --- a/.github/release.sh +++ b/.github/release.sh @@ -5,6 +5,7 @@ BRANCH_NAME="release/$1" PR_TITLE="Release $1" PR_BODY="Update Diffblue Cover to $1" +# If a second parameter is provided then we create an "testing" PR instead of a "release" PR if [ -n "$2" ]; then echo "Testing internal build" BRANCH_NAME="testing/$1" @@ -14,6 +15,7 @@ fi git checkout -b "$BRANCH_NAME" if [ -n "$2" ]; then + # If testing an internal build the version of the docker image will be the branch name followed by the version (all lower case with "/"s replaced by "-"s) DOCKER_VERSION=$(echo "${2,,}-${1,,}" | sed 's/\//-/g') sed -i "s/cli:[0-9]\{4\}\.[0-9]\{2\}\.[0-9]\{2\}-jdk/cli:$DOCKER_VERSION-jdk/g" Dockerfile sed -i "s|diffblue\/cover-cli:|docker.io/diffblue\/internal-cover-cli:|g" Dockerfile @@ -21,6 +23,7 @@ else sed -i "s/cli:[0-9]\{4\}\.[0-9]\{2\}\.[0-9]\{2\}-jdk/cli:$1-jdk/g" Dockerfile fi +# Push changes made to root Dockerfile to all children ./build.sh git add Dockerfile git add */Dockerfile