Skip to content

Commit

Permalink
Fix build failure + some minor change #690
Browse files Browse the repository at this point in the history
- assertReleaseable fails now only at execution phase and no
  longer at configuration phase
- changed the naming, so it is more clear that the tags are temporary
  until not released
  • Loading branch information
de-jcup committed Jul 6, 2021
1 parent 836c1ea commit 34678ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ jobs:
ref: master


# Create local tags, so we build documentation for this tag...
- name: "Tag server version: v${{ github.event.inputs.server-version }}-server - if defined"
# Create temporary local tags, so we build documentation for this tag...
# The final tag on git server side will be done by the release when the draft is saved as "real" release
# automatically.
- name: "Temporary tag server version: v${{ github.event.inputs.server-version }}-server - if defined"
if: github.event.inputs.server-version != ''
run: git tag v${{ github.event.inputs.server-version }}-server

- name: "Tag client version: v${{ github.event.inputs.client-version }}-client - if defined"
- name: "Temporary tag client version: v${{ github.event.inputs.client-version }}-client - if defined"
if: github.event.inputs.client-version != ''
run: git tag v${{ github.event.inputs.client-version }}-client

- name: "Tag PDS version: v${{ github.event.inputs.pds-version }}-pds - if defined"
- name: "Temporary tag PDS version: v${{ github.event.inputs.pds-version }}-pds - if defined"
if: github.event.inputs.pds-version != ''
run: git tag v${{ github.event.inputs.pds-version }}-pds

Expand Down
15 changes: 10 additions & 5 deletions build-versioning.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,18 @@ task assertReleaseable {
description = '''Asserts calculated versions do not contain a dirty flag inside.
(This should be called in releases after all artifact creations has nothing changed)'''

if (VersionData.isContainingAtLeastOneDirtyReleaseVersion()){
throw new IllegalStateException("At least one version was dirty and marked as a release!")
}
if (!VersionData.isContainingAtLeastOneRealReleaseVersion()){
throw new IllegalStateException("There is not at least one version defined which can be released! 0.0.0 is not an acceptable release version!")
doLast {
/* we only assert at execution phase - means when this task is really executed and not only configured...*/
if (VersionData.isContainingAtLeastOneDirtyReleaseVersion()){
throw new IllegalStateException("At least one version was dirty and marked as a release!")
}
if (!VersionData.isContainingAtLeastOneRealReleaseVersion()){
throw new IllegalStateException("There is not at least one version defined which can be released! 0.0.0 is not an acceptable release version!")
}
}



}


Expand Down

0 comments on commit 34678ce

Please sign in to comment.