Skip to content

Commit

Permalink
automate snapcraft
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensbox committed Jan 26, 2021
1 parent 731bb74 commit adbebb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
EXE := tfswitch
PKG := github.com/warrensbox/terraform-switcher
VER := $(shell git ls-remote --tags git://github.com/warrensbox/terraform-switcher | awk '{print $$2}'| awk -F"/" '{print $$3}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -n 1)
VER := $(shell git ls-remote --tags git://github.com/warrensbox/terraform-switcher | awk '{print $$2}'| awk -F"/" '{print $$3}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -n 2 | head -n1)
PATH := build:$(PATH)
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
Expand Down
3 changes: 2 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ parts:
go-buildtags:
- tfswitch
override-build:
go build -o ../install/bin/tfswitch
VER=$(git ls-remote --tags git://github.com/warrensbox/terraform-switcher | awk '{print $2}'| awk -F"/" '{print $3}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -n 2 | head -n1)
go build -v -ldflags "-X main.version=$VER" -o ../install/bin/tfswitch

0 comments on commit adbebb6

Please sign in to comment.