Skip to content

Commit

Permalink
Merge pull request #20 from m-triassi/19-version-flag
Browse files Browse the repository at this point in the history
Add auto-incrementing version flag
  • Loading branch information
m-triassi authored Dec 23, 2023
2 parents 7a64121 + 68e14de commit 80e4f2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: echo "${{ steps.changelog.outputs.clean_changelog }}" > ${{ runner.temp }}/CHANGELOG.md

- name: Update version number for flag
run: |
sed -i 's/const version = \"v[0-9\.]*\"/const version = \"${{ steps.changelog.outputs.tag }}\"/' cmd/root.go
- name: Commit release
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: |
Expand Down
7 changes: 5 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ import (

var cfgFile string

const version = "v1.0.0"

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "wowforge-cli",
Short: "A light installer for fetching your latest addons for WoW",
Use: "wowforge-cli",
Version: version,
Short: "A light installer for fetching your latest addons for WoW",
Long: `wowforge-cli is a light-weight command line utility that can fetch the latest versions
of your chosen addons. It maintains a list of tracked addons for you, and allows you to update them
all together.
Expand Down

0 comments on commit 80e4f2f

Please sign in to comment.