Skip to content

Commit

Permalink
Fix releaser.py import statement to be able to simply run it as `pyth…
Browse files Browse the repository at this point in the history
…on misc/releaser.py`
  • Loading branch information
touilleMan authored and FirelightFlagboy committed Mar 26, 2024
1 parent 296186d commit 46fe5b7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 25 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/_parse_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,12 @@ jobs:
id: version
shell: bash
run: >-
PYTHONPATH=. python3
misc/releaser.py version
"${{ inputs.version || '--uniq-dev' }}"
python misc/releaser.py version "${{ inputs.version || '--uniq-dev' }}"
| tee ${{ runner.temp }}/version.ini "$GITHUB_OUTPUT"
timeout-minutes: 2

- name: Set version for patching
run: >-
PYTHONPATH=. python3
misc/version_updater.py
--tool parsec
--version ${{ steps.version.outputs.full }}
run: python misc/version_updater.py --tool parsec --version ${{ steps.version.outputs.full }}
timeout-minutes: 2

- name: Generate git patch
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/_releaser_nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ jobs:
timeout-minutes: 1

- name: Create nightly release
run: >-
PYTHONPATH=. python3
misc/releaser.py build --nightly --yes --no-gpg-sign
run: python misc/releaser.py build --nightly --yes --no-gpg-sign
timeout-minutes: 2

- name: Get commit for nightly tag
Expand All @@ -47,7 +45,5 @@ jobs:

- name: Parse version
id: version
run: >-
PYTHONPATH=. python3
misc/releaser.py version | tee -a $GITHUB_OUTPUT
run: python misc/releaser.py version | tee -a $GITHUB_OUTPUT
timeout-minutes: 1
5 changes: 1 addition & 4 deletions .github/workflows/docker-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:

- name: Get current version
id: version
run: >-
PYTHONPATH=. python3
misc/releaser.py version --uniq-dev
| tee -a $GITHUB_OUTPUT
run: python misc/releaser.py version --uniq-dev | tee -a $GITHUB_OUTPUT
timeout-minutes: 1

- name: Generate build metadata
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/docker-testbed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ jobs:

- name: Get current version
id: version
run: >-
PYTHONPATH=. python3
misc/releaser.py version --uniq-dev
| tee -a $GITHUB_OUTPUT
run: python misc/releaser.py version --uniq-dev | tee -a $GITHUB_OUTPUT
timeout-minutes: 1

- name: Generate build metadata
Expand Down
2 changes: 1 addition & 1 deletion misc/releaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from pathlib import Path
from typing import Any

import misc.version_updater as version_updater # type: ignore (pyright struggles with this when run from server folder)
import version_updater # type: ignore (pyright struggles with this when run from server folder)

PYTHON_EXECUTABLE_PATH = sys.executable
LICENSE_CONVERSION_DELAY = 4 * 365 * 24 * 3600 # 4 years
Expand Down
2 changes: 1 addition & 1 deletion server/packaging/server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SCRIPTDIR=${SCRIPTDIR:=$(dirname "$(realpath -s "$0")")}
# Allow the user to overwrite `ROOTDIR` by exporting it beforehand.
ROOTDIR=${ROOTDIR:=$(realpath -s "$SCRIPTDIR/../../..")}

UNIQ_TAG=$(PYTHONPATH=$ROOTDIR python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
UNIQ_TAG=$(python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
# We use Github package repository to store our docker's container.
PREFIX=ghcr.io/scille/parsec-cloud
IMAGE_NAME=parsec-server
Expand Down
2 changes: 1 addition & 1 deletion server/packaging/testbed-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SCRIPTDIR=${SCRIPTDIR:=$(dirname "$(realpath -s "$0")")}
# Allow the user to overwrite `ROOTDIR` by exporting it beforehand.
ROOTDIR=${ROOTDIR:=$(realpath -s "$SCRIPTDIR/../../..")}

UNIQ_TAG=$(PYTHONPATH=$ROOTDIR python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
UNIQ_TAG=$(python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
# We use Github package repository to store our docker's container.
PREFIX=ghcr.io/scille/parsec-cloud

Expand Down

0 comments on commit 46fe5b7

Please sign in to comment.