Skip to content

Commit

Permalink
Merge pull request #80 from Apicurio/revert-57-use-jgitver
Browse files Browse the repository at this point in the history
Revert "[Proposal] Use version from git"
  • Loading branch information
carlesarnal authored Dec 9, 2022
2 parents cac8172 + c255c62 commit 813f201
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 38 deletions.
73 changes: 72 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,33 @@ jobs:
java-version: '11'
cache: maven


- name: Check Java Version
run: java -version


- name: Set up Maven
uses: stCarolas/setup-maven@v4
with:
maven-version: '3.6.3'


- name: Check Maven Version
run: mvn --version


- name: Log Metadata
run: |
echo "Releasing Apicurio Codegen version ${{ github.event.inputs.release-version }} from branch ${{ github.event.inputs.branch }}"
echo "Next Snapshot version will be ${{ github.event.inputs.snapshot-version }}"
- name: Set up settings.xml
run: |
echo "<settings><servers><server><id>${{ secrets.OSSRH_ID }}</id><username>${{ secrets.OSSRH_USERNAME }}</username><password>${{ secrets.OSSRH_TOKEN }}</password></server></servers><profiles><profile><id>${{ secrets.OSSRH_ID }}</id><activation><activeByDefault>true</activeByDefault></activation><properties><gpg.executable>gpg</gpg.executable><gpg.passphrase>${{ secrets.GPG_PASSPHRASE}}</gpg.passphrase></properties></profile></profiles></settings>" > /home/runner/.m2/settings.xml
cat /home/runner/.m2/settings.xml
- name: Configure Git
run: |
git init
Expand All @@ -59,23 +65,35 @@ jobs:
git pull
echo "#### Listing files ####"
find .
# To avoid permission denied issues
- name: Give full Permissions
run: chmod -R 777 $(pwd)


- name: Update Release Version ${{ github.event.inputs.release-version }}
run: git tag ${{ github.event.inputs.release-version }}
run: mvn versions:set -DnewVersion=${{ github.event.inputs.release-version }} -DgenerateBackupPoms=false -DprocessAllModules=true


- name: Verify Build
run: mvn clean install


- name: Commit Release Version Change
run: |
git add .
git commit -m "Automated version update: ${{ github.event.inputs.release-version}}"
git push
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v1
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}


- name: Maven Deploy
run: |
# Retry 3 times before the steps actually fails
Expand Down Expand Up @@ -160,3 +178,56 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
options: '--override'

set-next-snapshot:
needs: release-native-binaries
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch}}

- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
cache: maven

- name: Check Java Version
run: java -version

- name: Set up Maven
uses: stCarolas/setup-maven@v4
with:
maven-version: '3.6.3'

- name: Check Maven Version
run: mvn --version

- name: Update Snapshot version ${{ github.event.inputs.snapshot-version}}
run: mvn versions:set -DnewVersion=${{ github.event.inputs.snapshot-version}} -DgenerateBackupPoms=false -DprocessAllModules=true

- name: Configure Git
run: |
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git branch --set-upstream-to=origin/${{ github.event.inputs.branch}}
git pull
echo "#### Listing files ####"
find .
- name: Commit Snapshot Version Change
run: |
git add .
git commit -m"Automated version update: ${{ github.event.inputs.snapshot-version}}"
git push
- name: Google Chat Notification
if: ${{ failure() }}
uses: Co-qn/google-chat-notification@releases/v1
with:
name: ${{ github.workflow }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
8 changes: 0 additions & 8 deletions .mvn/extensions.xml

This file was deleted.

10 changes: 0 additions & 10 deletions .mvn/jgitver.config.xml

This file was deleted.

9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
# apicurio-codegen

Repository to hold some code generation utilities.

## Build

If you are compiling this project from sources without git/git history make sure to pass the appropriate version to the `mvn` commands e.g.:

```
mvn <goals...> -Djgitver.use-version=<version>
```
2 changes: 1 addition & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-parent</artifactId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-parent</artifactId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-parent</artifactId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-parent</artifactId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

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>io.apicurio</groupId>
<artifactId>apicurio-codegen-parent</artifactId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<name>apicurio-codegen-parent</name>
<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion quarkus-extension/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apicurio-codegen-quarkus-extension-parent</artifactId>
<groupId>io.apicurio</groupId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion quarkus-extension/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>apicurio-codegen-quarkus-extension-parent</artifactId>
<groupId>io.apicurio</groupId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<parent>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-parent</artifactId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>apicurio-codegen-quarkus-extension-parent</artifactId>
<packaging>pom</packaging>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>

<modules>
<module>deployment</module>
Expand Down
2 changes: 1 addition & 1 deletion quarkus-extension/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>apicurio-codegen-quarkus-extension-parent</artifactId>
<groupId>io.apicurio</groupId>
<version>999-SNAPSHOT</version>
<version>1.0.13-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down

0 comments on commit 813f201

Please sign in to comment.