Skip to content

Commit

Permalink
Added a make target to install
Browse files Browse the repository at this point in the history
  • Loading branch information
adampresley committed Jun 13, 2021
1 parent 42077df commit ed1c9e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GC=${GOENV} go build -ldflags="${BUILDFLAGS}" -mod=mod -o ${PROJECTNAME}

ifeq ($(OS),Windows_NT)
GOOS=windows
EXENAME=${PROJECTNAME}.exe
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
GOARCH=amd64
else
Expand All @@ -26,8 +27,10 @@ else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
GOOS=linux
EXENAME=${PROJECTNAME}
endif
ifeq ($(UNAME_S),Darwin)
EXENAME=${PROJECTNAME}
GOOS=darwin
endif
UNAME_P := $(shell uname -p)
Expand Down Expand Up @@ -75,3 +78,5 @@ package: ## Package executables into a ZIP file
zip ./${PROJECTNAME}-windows-amd64-${VERSION}.zip ./*windows*
zip ./${PROJECTNAME}-darwin-${VERSION}.zip ./*darwin*

install: build ## Create a symlink to this executable in /usr/local/bin
ln -s $(PWD)/${EXENAME} /usr/local/bin/${EXENAME}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.1
1.2.2

0 comments on commit ed1c9e6

Please sign in to comment.