Skip to content

Commit

Permalink
Allow automaticly creating PRs to test internal builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasPerkins1123 committed May 1, 2024
1 parent bc32598 commit 9cc8468
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,21 @@ BRANCH_NAME="release/$1"
PR_TITLE="Release $1"
PR_BODY="Update Diffblue Cover to $1"

if [ -n "$2" ]; then
echo "Testing internal build"
BRANCH_NAME="testing/$1"
PR_TITLE="Testing $1"
fi

git checkout -b "$BRANCH_NAME"

sed -i "s/cli:[0-9]\{4\}\.[0-9]\{2\}\.[0-9]\{2\}-jdk/cli:$1-jdk/g" Dockerfile
if [ -n "$2" ]; then
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

./build.sh
git add Dockerfile
Expand Down

0 comments on commit 9cc8468

Please sign in to comment.