Skip to content

Commit

Permalink
Add comments to release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasPerkins1123 committed May 2, 2024
1 parent 9cc8468 commit 2beb552
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -14,13 +15,15 @@ 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
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
Expand Down

0 comments on commit 2beb552

Please sign in to comment.