Skip to content

Commit 61db626

Browse files
author
Jacob Truman
committed
XENG-8957 Create version file for build steps
1 parent b961fc8 commit 61db626

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ jobs:
5959
# Fetch all history instead of the latest commit
6060
fetch-depth: 0
6161
- name: Get and set version in env
62-
run: echo "CURRENT_VERSION=$( python setup.py --version )" >> $GITHUB_ENV
62+
run: |
63+
python scripts/write-version.py
64+
echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_ENV
6365
- name: Print current version
6466
run: echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
6567
- name: Tag commit
@@ -80,6 +82,8 @@ jobs:
8082
- name: Remove version file
8183
# This is just in case something else created it, destroy it to get a fresh version
8284
run: rm -f buildrunner/version.py
85+
- name: Write version file
86+
run: python scripts/write-version.py
8387
- name: Install wheel
8488
run: pip install wheel build
8589
- name: Build
@@ -103,7 +107,9 @@ jobs:
103107
# Fetch all history instead of the latest commit
104108
fetch-depth: 0
105109
- name: Get and set version in env
106-
run: echo "CURRENT_VERSION=$( python setup.py --version )" >> $GITHUB_ENV
110+
run: |
111+
python scripts/write-version.py
112+
echo "CURRENT_VERSION=$( python -c 'from buildrunner.version import __version__; print(__version__)' )" >> $GITHUB_ENV
107113
- name: Print current version
108114
run: echo CURRENT_VERSION ${{ env.CURRENT_VERSION }}
109115
- name: Docker Tags

0 commit comments

Comments
 (0)