Automate khoj python package versioning using hatch-vcs and Git tags

This commit is contained in:
Debanjum Singh Solanky
2023-02-17 17:08:05 -06:00
parent 053d6141f3
commit a8940462c4
2 changed files with 6 additions and 12 deletions

View File

@@ -35,16 +35,6 @@ jobs:
- name: Install Application
run: python -m pip install --upgrade pip && pip install --upgrade .
- name: 📝 Set Pre-Release Version for Master
if: github.ref == 'refs/heads/master'
run: sed -E -i "s/version = (.*)\"/version = \1a$(date +%s)\"/g" pyproject.toml
- name: 📝 Set Development Version for PR
if: github.event_name == 'pull_request'
env:
PULL_REQUEST_NUMBER: ${{ github.event.number }}
run: sed -E -i "s/version = (.*)\"/version = \1.dev$PULL_REQUEST_NUMBER$(date +%s)\"/g" pyproject.toml
- name: ⚙️ Build Python Package
run: |
# Setup Environment for Reproducible Builds