Skip to content
Snippets Groups Projects
Unverified Commit fa37ead9 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[pkg] do not make user mess with symlinks in gopath

parent 9770a0dd
No related branches found
No related tags found
No related merge requests found
...@@ -12,13 +12,18 @@ PROVIDER_CONFIG ?= branding/config/vendor.conf ...@@ -12,13 +12,18 @@ PROVIDER_CONFIG ?= branding/config/vendor.conf
DEFAULT_PROVIDER = branding/assets/default/ DEFAULT_PROVIDER = branding/assets/default/
VERSION ?= $(shell git describe) VERSION ?= $(shell git describe)
# go paths
GOPATH = $(shell go env GOPATH)
SYSTRAY = "0xacab.org/leap/bitmask-vpn"
GOSYSTRAY = ${GOPATH}/src/${SYSTRAY}
# detect OS, we use it for dependencies # detect OS, we use it for dependencies
UNAME = `uname` UNAME = `uname`
TEMPLATES = "branding/templates" TEMPLATES = "branding/templates"
SCRIPTS = "branding/scripts" SCRIPTS = "branding/scripts"
all: icon locales get build all: icon locales build
######################################################################### #########################################################################
# go build # go build
...@@ -41,10 +46,14 @@ dependsCygwin: ...@@ -41,10 +46,14 @@ dependsCygwin:
choco install -y golang python nssm nsis wget 7zip choco install -y golang python nssm nsis wget 7zip
get: get:
@go get -tags $(TAGS) ./... -@mkdir -p ${GOPATH}/src/0xacab.org/leap
@go get -tags "$(TAGS) bitmaskd" ./... -@ln -s `pwd` ${GOSYSTRAY}
@cd ${GOSYSTRAY} && go get -tags $(TAGS) ./...
@cd ${GOSYSTRAY} && go get -tags "$(TAGS) bitmaskd" ./...
# when we can depend on go 1.11 we don't need the get step anymore
build: $(foreach path,$(wildcard cmd/*),build_$(patsubst cmd/%,%,$(path))) build: get $(foreach path,$(wildcard cmd/*),build_$(patsubst cmd/%,%,$(path)))
build_%: build_%:
go build -tags $(TAGS) -ldflags "-s -w -X main.version=`git describe --tags`" -o $* ./cmd/$* go build -tags $(TAGS) -ldflags "-s -w -X main.version=`git describe --tags`" -o $* ./cmd/$*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment