Skip to content

Commit

Permalink
fix for release task (#1786)
Browse files Browse the repository at this point in the history
* use correct inline option

* use helper scripts

* disable pr trigger

* hide azure pipelines folder
  • Loading branch information
epassaro authored Aug 26, 2021
1 parent 575002c commit ef056ce
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ jobs:
- bash: |
cd $(tardis.dir)
source activate tardis
echo $(python -c 'from setuptools_scm import version_from_scm; from setuptools_scm.version import guess_next_date_ver; release = version_from_scm("."); print(release.tag.public)')
displayName: 'Check latest TARDIS tag'
echo $(python .ci-helpers/get_current_version.py)
displayName: 'Check latest tag'
- bash: |
cd $(tardis.dir)
source activate tardis
echo "##vso[task.setvariable variable=newtag]$(python -c 'from setuptools_scm import version_from_scm; from setuptools_scm.version import guess_next_date_ver; release = version_from_scm("."); print(guess_next_date_ver(release.tag.public))')"
displayName: 'Get new TARDIS tag'
echo "##vso[task.setvariable variable=newtag]$(python .ci-helpers/get_next_version.py)"
displayName: 'Get new tag'
- bash: echo $(newtag)
displayName: 'Check new TARDIS tag'
displayName: 'Check new tag'

- task: GitHubRelease@1
inputs:
Expand All @@ -60,6 +60,6 @@ jobs:
tagSource: 'userSpecifiedTag'
tag: 'release-$(newtag)'
title: 'TARDIS v$(newtag)'
releaseNotesSource: 'input'
releaseNotesSource: 'inline'
releaseNotes: 'This release has been made automatically through our continous delivery pipeline. For a complete list of changes see [CHANGELOG.md](https://github.com/tardis-sn/tardis/blob/master/CHANGELOG.md).'
displayName: 'Create GitHub Release'
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions .ci-helpers/get_current_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python

import sys
from setuptools_scm import version_from_scm
from setuptools_scm.version import guess_next_date_ver

version = version_from_scm(".").tag.public

print(version)
sys.exit(0)
12 changes: 12 additions & 0 deletions .ci-helpers/get_next_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python

import sys
from setuptools_scm import version_from_scm
from setuptools_scm.version import guess_next_date_ver

version = version_from_scm(".").tag.public
version = guess_next_date_ver(version)
version = version.rstrip(".0") if version.endswith(".0") else version

print(version)
sys.exit(0)

0 comments on commit ef056ce

Please sign in to comment.