Skip to content

Commit 438dcd2

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

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-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

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ buildrunner-cleanup = "buildrunner.cli:clean_cache"
3333

3434
[tool.setuptools.packages.find]
3535
exclude = ["*.tests", "*.tests.*", "tests.*", "tests"]
36+
37+
[tool.pytest.ini_options]
38+
retries = 2

0 commit comments

Comments
 (0)