Skip to content

Commit

Permalink
BRE-367 - Update regex in Publish Java workflow (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrassia authored Oct 17, 2024
1 parent 1a523e9 commit 6babf9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
id: version-output
run: |
if [[ "${{ inputs.version }}" == "latest" || "${{ inputs.version }}" == "" ]]; then
TAG_NAME=$(curl "https://api.github.com/repos/bitwarden/sdk/releases" | jq -c '.[] | select(.tag_name | contains("java")) | .tag_name' | head -1)
VERSION=$(echo $TAG_NAME | grep -ohE '20[0-9]{2}\.([1-9]|1[0-2])\.[0-9]+')
TAG_NAME=$(curl "https://api.github.com/repos/bitwarden/sdk/releases" | jq -rc '.[] | select(.tag_name | contains("java")) | .tag_name' | head -1)
VERSION=$(echo $TAG_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
echo "Latest Released Version: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion languages/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repositories {

def branchName = "git branch --show-current".execute().text.trim()

if (branchName == "main" || branchName == "rc" || branchName == "hotfix-rc") {
if (branchName == "main") {
version = "1.0.1"
} else {
// branchName-SNAPSHOT
Expand Down

0 comments on commit 6babf9e

Please sign in to comment.