Skip to content

Commit 2c07ff6

Browse files
authored
Merge pull request #36 from CoverGo/fix/accept-and-pass-release-candidate-version-parameter
fix(versioning): Accept and pass release-candidate-version parameter
2 parents 2cf37d3 + fdd34cc commit 2c07ff6

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.gflows/libs/job_version.lib.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
#@ return "none"
1919
#@ end
2020
---
21+
#@ def get_release_candidate_version_flag(context):
22+
#@ if getattr(getattr(context,"versioning",None),"release_candidate_version", True):
23+
#@ return True
24+
#@ end
25+
#@ return False
26+
#@ end
27+
---
2128
#@ def generate_version_job(sections):
2229
runs-on: ubuntu-latest
2330
name: Get version from git tag
@@ -43,7 +50,8 @@ steps:
4350
build-number: #@ set_build_number(sections)
4451
pre-release-version: #@ set_version(sections)
4552
production-branches: #@ "\n".join(getattr(getattr(sections,"versioning",None),"production_branches",["master","main"]))
46-
- name: Is production check
53+
release-candidate-version: #@ get_release_candidate_version_flag(sections)
54+
- name: Is production check
4755
shell: bash
4856
id: is_production_check
4957
run: |

.gflows/workflow-configuration/build-publish/settings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ git:
229229
versioning:
230230
use_build_number: false
231231
use_branch_slug: true
232+
release_candidate_version: false
232233
# production_branches:
233234
# - my_prod_branch
234235
# - my_prod_branch2

github-sample/workflows/build-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
production-branches: |-
4747
master
4848
main
49+
release-candidate-version: false
4950
- name: Is production check
5051
shell: bash
5152
id: is_production_check

0 commit comments

Comments
 (0)