diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml deleted file mode 100644 index 9bf00fb..0000000 --- a/.github/workflows/update-version.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Update version file - -on: - release: - types: - - created - -jobs: - update_version: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Update version.json - run: | - echo "{ - \"version\": \"${{ github.event.release.tag_name }}\" - }" > version.json - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "chore: update version to ${{ github.event.release.tag_name }}" diff --git a/cmd/vaults/main.go b/cmd/vaults/main.go index 1fb98db..e4dc078 100644 --- a/cmd/vaults/main.go +++ b/cmd/vaults/main.go @@ -20,10 +20,11 @@ func init() { } } +var version = "dev" + func main() { // migrate v1 config to v2 config migrateConfigV1ToV2() - version := getVersion() cliApp := &cli.App{ Name: "vaults", diff --git a/cmd/vaults/utils.go b/cmd/vaults/utils.go deleted file mode 100644 index b63c94e..0000000 --- a/cmd/vaults/utils.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "encoding/json" - "os" -) - -type version struct { - Version string `json:"version"` -} - -func getVersion() string { - var v version - data, err := os.ReadFile("version.json") - if err != nil { - return "unknown" - } - err = json.Unmarshal(data, &v) - if err != nil { - return "unknown" - } - return v.Version -} diff --git a/version.json b/version.json deleted file mode 100644 index 0c7dfa8..0000000 --- a/version.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "version": "v0.0.6" -}