Skip to content

Commit

Permalink
added Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
cpliakas committed Jan 21, 2021
1 parent f8a42e5 commit 01a453b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ builds:
- linux
- windows
- darwin
ldflags:
- -s -w -X main.Version={{.Version}}
archives:
- replacements:
darwin: Darwin
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: dist
dist:
goreleaser --snapshot --skip-publish --rm-dist

.PHONY: run
run:
./dist/goreleaser-test_darwin_amd64/goreleaser-test

.PHONY: clean
clean:
rm -rf ./dist
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package main

import "fmt"

// Version is the application version.
var Version string

func main() {
fmt.Println("Testing my release")
fmt.Println(Version)
}

0 comments on commit 01a453b

Please sign in to comment.