Skip to content

Commit

Permalink
update releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemackintosh committed Mar 9, 2023
1 parent d295990 commit 3475545
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
chrono
release/bin
3 changes: 2 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
v1.0.5
v1.0.6
- Adds release process
- Update version
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/mikemackintosh/chrono

go 1.16

require golang.org/dl v0.0.0-20210713194856-38ddc79c2163 // indirect
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
golang.org/dl v0.0.0-20210713194856-38ddc79c2163 h1:jXLgj2BCnzX1kzp3/qXSSiXUud5aMgfJ8eVxlhBJ9cA=
golang.org/dl v0.0.0-20210713194856-38ddc79c2163/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ=
7 changes: 7 additions & 0 deletions internal/version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package version

var (
Version = "dev"
CommitHash = "8008135"
BuildTimestamp = "1970-01-01T00:00:00"
)
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"strconv"
"strings"
"time"

"github.com/mikemackintosh/chrono/internal/version"
)

var (
Expand All @@ -25,8 +27,9 @@ func main() {

flag.Parse()

// Show the version info only if it's requested
if flagVersion {
fmt.Printf("1.0")
fmt.Printf("%s - %s\n", version.Version, version.CommitHash)
os.Exit(0)
}

Expand Down
2 changes: 1 addition & 1 deletion release/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
for os in ${OS[@]}; do
for arch in ${ARCH[@]}; do
echo -e "\nBuilding for $os-$arch"
GOOS=$os GOARCH=$arch go build -ldflags="-s -w ${LDFLAGS[*]}" -o release/bin/chrono-$os-$arch cmd/main.go
GOOS=$os GOARCH=$arch go build -ldflags="-s -w ${LDFLAGS[*]}" -o release/bin/chrono-$os-$arch main.go
echo $(shasum -a 256 release/bin/chrono-$os-$arch)
done
done

0 comments on commit 3475545

Please sign in to comment.