Skip to content

Commit

Permalink
ci: fix version bump in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
bonjourmauko committed Oct 23, 2024
1 parent 2669ecf commit 15193af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ jobs:
- name: Force correct branch on workflow sha
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}

- name: Build the library
env:
TERM: xterm-256color
run: ./build.sh
- name: Install Poetry
run: pipx install poetry

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12.6
cache: poetry

- name: Install Dependencies
run: poetry install --no-root --with dev --sync

- name: Semantic Version Tagging
uses: python-semantic-release/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ shfmt-py = "^3.7.0.1"
yamllint = "^1.35.1"

[tool.semantic_release]
build_command = "TERM=xterm-256color ./build.sh"
tag_format = "{version}"
version_toml = [ "pyproject.toml:tool.poetry.version" ]
version_variables = [ "src/first_time_setup/messages.sh:version" ]
8 changes: 1 addition & 7 deletions src/first_time_setup/messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ set -euo pipefail

source 'src/first_time_setup/envvars.sh'

# @internal
msg.version() {
grep '^version =' pyproject.toml | cut -d '"' -f 2
}

# @description Define the welcome message.
msg::welcome() {
local version
version=$(msg.version)
local -r version='0.0.0'
cat <<MSG
Welcome to the OpenFisca Extension Template setup script v${version}!
Expand Down

0 comments on commit 15193af

Please sign in to comment.