Skip to content

Commit

Permalink
fix: Fix version control
Browse files Browse the repository at this point in the history
  • Loading branch information
GNITOAHC committed Oct 11, 2024
1 parent 379c63f commit 24ae5de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func main() {
inputfile := flag.Arg(0)

if version {
fmt.Println("md-html v0.1.0")
fmt.Println("md-html v", Version)
return
}

Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for platform in "${PLATFORMS[@]}"; do
output_name+='.exe'
fi

GOOS=$GOOS GOARCH=$GOARCH go build -o $BUILD_DIR/$output_name -ldflags "-s -w"
GOOS=$GOOS GOARCH=$GOARCH go build -o $BUILD_DIR/$output_name -ldflags "-s -w -X main.Version=$VERSION"
tar -czf $BUILD_DIR/$BINARY-$VERSION-$GOOS-$GOARCH.tar.gz -C $BUILD_DIR $output_name

echo "Build $BINARY-$VERSION-$GOOS-$GOARCH.tar.gz done"
Expand Down
4 changes: 4 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package main

// Version of the program
var Version = "0.0.0"

0 comments on commit 24ae5de

Please sign in to comment.