Skip to content

Commit

Permalink
[Fix] Incorporate poetry changes into nightly build workflows (#225)
Browse files Browse the repository at this point in the history
## Problem

Nightly builds have not succeeded since poetry stuff got merged a couple
of weeks ago. This is because the version update step was not updated to
change the version number in pyproject.toml and pypi complained of
version conflicts.

## Solution

Use poetry to set version in `pyproject.toml` before uploading to pypi.

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Infrastructure change (CI configs, etc)
  • Loading branch information
jhamon authored Oct 20, 2023
1 parent 13646fa commit 591b8fb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ jobs:
if: steps.list-commits.outputs.commits == ''
uses: andymckay/[email protected]

- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Set dev version
id: version
run: |
versionFile="pinecone/__version__"
currentDate=$(date +%Y%m%d%H%M%S)
versionNumber=$(cat $versionFile)
versionNumber=$(poetry version -s)
devVersion="${versionNumber}.dev${currentDate}"
echo "$devVersion" > $versionFile
poetry version $devVersion
- name: Adjust module name
run: |
Expand All @@ -45,13 +51,6 @@ jobs:
run: |
echo "This is a nightly developer build of the Pinecone Python client. It is not intended for production use." > README.md
- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Build Python client
run: make package

Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/nightly-spruce-dev-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ jobs:
if: steps.list-commits.outputs.commits == ''
uses: andymckay/[email protected]

- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Set spruce dev version
run: |
versionFile="pinecone/__version__"
currentDate=$(date +%Y%m%d%H%M%S)
versionNumber=$(cat $versionFile)
devVersion="${versionNumber}.dev${currentDate}.spruceDev"
echo "$devVersion" > $versionFile
versionNumber=$(poetry version -s)
devVersion="${versionNumber}.dev${currentDate}"
poetry version $devVersion
- name: Adjust module name
run: |
Expand All @@ -46,13 +52,6 @@ jobs:
run: |
echo "This is a nightly Spruce developer build of the Pinecone Python client. It is not intended for production use." > README.md
- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Setup Poetry
uses: ./.github/actions/setup-poetry

- name: Build Python client
run: make package

Expand Down

0 comments on commit 591b8fb

Please sign in to comment.