Skip to content

Commit

Permalink
Merge pull request #29 from protegeproject/pull_changes_from_master
Browse files Browse the repository at this point in the history
Pull changes from master and updated release.yaml
  • Loading branch information
soimugeoWB authored Jun 20, 2024
2 parents b6074d5 + d8b0052 commit 0b535b7
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 9 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Release
on:
push:
branches:
- master*
- master
- master-who

jobs:
build:
Expand Down Expand Up @@ -32,9 +33,36 @@ jobs:
server-id: docker.io
server-username: DOCKER_USERNAME
server-password: DOCKER_PASSWORD
- name: Get current version
id: get-version
run: |
current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Current version: $current_version"
echo "::set-output name=current_version::$current_version"
- name: Bump version
id: bump
uses: mickem/gh-action-bump-maven-version@v1
run: |
current_version=${{ steps.get-version.outputs.current_version }}
branch=${GITHUB_REF##*/}
echo "Current branch: $branch"
# Extract the base version without suffix
base_version=$(echo $current_version | sed -E 's/(-.*)?$//')
# Increment the base version (assuming semantic versioning)
IFS='.' read -r -a version_parts <<< "$base_version"
version_parts[2]=$((version_parts[2] + 1))
new_base_version="${version_parts[0]}.${version_parts[1]}.${version_parts[2]}"
if [[ "$branch" == "master-who" ]]; then
new_version="${new_base_version}-WHO"
else
new_version="$new_base_version"
fi
echo "New version: $new_version"
mvn versions:set -DnewVersion=$new_version -DgenerateBackupPoms=false
echo "::set-output name=new_version::$new_version"
- name: Build package
run: mvn --batch-mode clean package
- name: Build and push image
Expand All @@ -44,7 +72,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump.outputs.tag }}
tag_name: ${{ steps.bump.outputs.new_version }}
generate_release_notes: true

env:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-gwt-ui</artifactId>
<version>5.0.16</version>
<version>5.0.16-WHO</version>
<packaging>pom</packaging>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion webprotege-gwt-ui-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-gwt-ui</artifactId>
<version>5.0.16</version>
<version>5.0.16-WHO</version>
</parent>

<artifactId>webprotege-gwt-ui-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion webprotege-gwt-ui-server-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>webprotege-gwt-ui</artifactId>
<groupId>edu.stanford.protege</groupId>
<version>5.0.16</version>
<version>5.0.16-WHO</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion webprotege-gwt-ui-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-gwt-ui</artifactId>
<version>5.0.16</version>
<version>5.0.16-WHO</version>
</parent>

<artifactId>webprotege-gwt-ui-server</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion webprotege-gwt-ui-shared-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>webprotege-gwt-ui</artifactId>
<groupId>edu.stanford.protege</groupId>
<version>5.0.16</version>
<version>5.0.16-WHO</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion webprotege-gwt-ui-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>webprotege-gwt-ui</artifactId>
<version>5.0.16</version>
<version>5.0.16-WHO</version>
</parent>

<artifactId>webprotege-gwt-ui-shared</artifactId>
Expand Down

0 comments on commit 0b535b7

Please sign in to comment.