Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Aug 31, 2019
1 parent b24201c commit 4f42caf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
cmd/cmd
cmd/glance
.DS_Store
cmd/*.tar.gz
5 changes: 0 additions & 5 deletions cmd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ release:
go clean
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o ${BINARY} -ldflags "-s -w -X main.Version=${VERSION}"
tar czvf ${BINARY}-linux64-${VERSION}.tar.gz ./${BINARY}
# Build for win
go clean
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 GO111MODULE=on go build -o ${BINARY}.exe -ldflags "-s -w -X main.Version=${VERSION}"
tar czvf ${BINARY}-win64-${VERSION}.tar.gz ./${BINARY}.exe
go clean
# Cleans our projects: deletes binaries
clean:
go clean
Expand Down
7 changes: 7 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"path/filepath"
"strings"

"github.com/TimothyYe/glance/lib"

"github.com/TimothyYe/glance/core"
"github.com/TimothyYe/glance/reader"
)
Expand All @@ -21,6 +23,11 @@ func main() {
os.Exit(1)
}

if len(os.Args) == 2 && os.Args[1] == "-v" {
lib.Display(Version)
os.Exit(0)
}

ext := strings.ToUpper(filepath.Ext(os.Args[1]))

// create reader
Expand Down
7 changes: 0 additions & 7 deletions lib/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ import "fmt"
var (
// Logo
Logo = `
#####
# # # ## # # #### ######
# # # # ## # # # #
# #### # # # # # # # #####
# # # ###### # # # # #
# # # # # # ## # # #
##### ###### # # # # #### ######
Glance V%s
https://github.com/TimothyYe/glance
`
Expand Down

0 comments on commit 4f42caf

Please sign in to comment.