Do not use vendoring

This commit is contained in:
wpetit 2020-09-08 11:40:25 +02:00
parent a0677f23e5
commit 38ac4422dd
2 changed files with 4 additions and 10 deletions

View File

@ -3,18 +3,15 @@ SHELL := /bin/bash
DOCKER_IMAGE_NAME ?= bornholm/hydra-passwordless DOCKER_IMAGE_NAME ?= bornholm/hydra-passwordless
DOCKER_IMAGE_TAG ?= latest DOCKER_IMAGE_TAG ?= latest
build: vendor build:
CGO_ENABLED=0 go build -mod=vendor -v -o bin/server ./cmd/server CGO_ENABLED=0 go build -v -o bin/server ./cmd/server
test: test:
go test -v -race ./... go test -v -race ./...
release: vendor release:
@$(SHELL) ./misc/script/release.sh @$(SHELL) ./misc/script/release.sh
vendor:
go mod vendor
tidy: tidy:
go mod tidy go mod tidy
@ -40,7 +37,6 @@ create-default-client:
-n "Default App" \ -n "Default App" \
-a "openid" -a "email" -a "openid" -a "email"
list-clients: list-clients:
docker-compose exec \ docker-compose exec \
-e HYDRA_URL=http://localhost:4445 \ -e HYDRA_URL=http://localhost:4445 \
@ -95,7 +91,6 @@ docker-release: docker-build
clean: clean:
rm -rf release rm -rf release
rm -rf data rm -rf data
rm -rf vendor
rm -rf bin rm -rf bin
.PHONY: lint watch build vendor tidy release .PHONY: lint watch build tidy release

View File

@ -24,7 +24,6 @@ function build {
echo "building $dirname..." echo "building $dirname..."
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build \ CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build \
-mod=vendor \
-ldflags="-s -w -X 'main.GitRef=$(current_commit_ref)' -X 'main.ProjectVersion=$(current_version)' -X 'main.BuildDate=$(current_date)'" \ -ldflags="-s -w -X 'main.GitRef=$(current_commit_ref)' -X 'main.ProjectVersion=$(current_version)' -X 'main.BuildDate=$(current_date)'" \
-gcflags=-trimpath="${PWD}" \ -gcflags=-trimpath="${PWD}" \
-asmflags=-trimpath="${PWD}" \ -asmflags=-trimpath="${PWD}" \