Skip to content

Commit

Permalink
Merge pull request #15 from nextmv-io/merschformann/add-version-info
Browse files Browse the repository at this point in the history
Adds version info for convenience
  • Loading branch information
merschformann authored Aug 29, 2024
2 parents bd942d8 + 0f9a796 commit 108816e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ jobs:
exit 1
fi
fi
- name: ensure version is not already released
run: |
if git ls-remote --tags origin | grep -q "refs/tags/$VERSION"; then
echo "Version $VERSION already exists"
exit 1
fi
- name: configure git with the bot credentials
run: |
mkdir -p ~/.ssh
Expand All @@ -58,6 +66,18 @@ jobs:
git rev-parse --short HEAD
- name: bump version in version file
run: |
echo $VERSION > VERSION
working-directory: ./go-highs

- name: commit version bump
run: |
git add VERSION
git commit -m "Bumping version to $VERSION"
git push origin ${{ github.ref_name }}
working-directory: ./go-highs

- name: push release tag
run: |
git tag $VERSION
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.6.0
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/nextmv-io/go-highs

go 1.21

require github.com/nextmv-io/go-mip v1.6.0
require github.com/nextmv-io/go-mip v1.6.1

require (
github.com/sergi/go-diff v1.3.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nextmv-io/go-mip v1.6.0 h1:UULt5UcLvLLISWMcXBq+1Q+rO9eV9gUH15wT0dfCzZM=
github.com/nextmv-io/go-mip v1.6.0/go.mod h1:8kETFsctIoqHLo+YpBoo9QdXYvhxUxJzJzyCQaf6YLc=
github.com/nextmv-io/go-mip v1.6.1 h1:bIdLSuYu1L5P6BoKWA+Joiy6wCWrrEPYNi8ml7H4GKc=
github.com/nextmv-io/go-mip v1.6.1/go.mod h1:8kETFsctIoqHLo+YpBoo9QdXYvhxUxJzJzyCQaf6YLc=
github.com/nextmv-io/sdk v1.8.0 h1:EqYibIyeaFRc9zgyPUUwbD2nx9z37l18YfJfVe1wHCU=
github.com/nextmv-io/sdk v1.8.0/go.mod h1:Y48XLPcIOOxRgO86ICNpqGrH2N5+dd1TDNvef/FD2Kc=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
Expand Down
16 changes: 16 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// © 2019-present nextmv.io inc

package highs

import (
_ "embed"
"strings"
)

//go:embed VERSION
var version string

// Version returns the version of the highs module.
func Version() string {
return strings.TrimSpace(version)
}

0 comments on commit 108816e

Please sign in to comment.