Skip to content

Commit

Permalink
Change version placeholder to valid semantic version
Browse files Browse the repository at this point in the history
The version placeholder in pyproject.toml is changed from "VERSION_PLACEHOLDER" to "0.0.0" to ensure that the test workflow doesn't fail due to an invalid version string. The docker-publish.yml and pypi-publish.yml workflows are updated to search for and replace "0.0.0" instead of "VERSION_PLACEHOLDER" during the release process.
  • Loading branch information
mdbecker committed Jun 25, 2023
1 parent 217764c commit 5d9b2f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Update and validate version in pyproject.toml
run: |
# Replacing the placeholder version with the actual version from the tag
sed -i "s/version = \"VERSION_PLACEHOLDER\"/version = \"${{ steps.release-version.outputs.version }}\"/" pyproject.toml
sed -i "s/version = \"0.0.0\"/version = \"${{ steps.release-version.outputs.version }}\"/" pyproject.toml
# Validate that the version follows semantic versioning
if ! echo "${{ steps.release-version.outputs.version }}" | grep -Pq '^\d+(\.\d+){2}'; then
echo "Invalid version format. Should be semantic versioning."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Update and validate version in pyproject.toml
run: |
# Replacing the placeholder version with the actual version from the tag
sed -i "s/version = \"VERSION_PLACEHOLDER\"/version = \"${{ steps.release-version.outputs.version }}\"/" pyproject.toml
sed -i "s/version = \"0.0.0\"/version = \"${{ steps.release-version.outputs.version }}\"/" pyproject.toml
# Validate that the version follows semantic versioning
if ! echo "${{ steps.release-version.outputs.version }}" | grep -Pq '^\d+(\.\d+){2}'; then
echo "Invalid version format. Should be semantic versioning."
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["poetry-core"]

[tool.poetry]
name = "gull-api"
version = "VERSION_PLACEHOLDER"
version = "0.0.0"
description = "A REST API for running Large Language Models"
authors = ["Michael Becker <mdbecker@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 5d9b2f3

Please sign in to comment.