From 38ac4422dddc21872b2b53b26d0fc8db875ff04b Mon Sep 17 00:00:00 2001 From: William Petit Date: Tue, 8 Sep 2020 11:40:25 +0200 Subject: [PATCH] Do not use vendoring --- Makefile | 13 ++++--------- misc/script/release.sh | 1 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 23b1008..5285aa1 100644 --- a/Makefile +++ b/Makefile @@ -3,18 +3,15 @@ SHELL := /bin/bash DOCKER_IMAGE_NAME ?= bornholm/hydra-passwordless DOCKER_IMAGE_TAG ?= latest -build: vendor - CGO_ENABLED=0 go build -mod=vendor -v -o bin/server ./cmd/server +build: + CGO_ENABLED=0 go build -v -o bin/server ./cmd/server test: go test -v -race ./... -release: vendor +release: @$(SHELL) ./misc/script/release.sh -vendor: - go mod vendor - tidy: go mod tidy @@ -40,7 +37,6 @@ create-default-client: -n "Default App" \ -a "openid" -a "email" - list-clients: docker-compose exec \ -e HYDRA_URL=http://localhost:4445 \ @@ -95,7 +91,6 @@ docker-release: docker-build clean: rm -rf release rm -rf data - rm -rf vendor rm -rf bin -.PHONY: lint watch build vendor tidy release \ No newline at end of file +.PHONY: lint watch build tidy release \ No newline at end of file diff --git a/misc/script/release.sh b/misc/script/release.sh index 5cbe882..b5e30aa 100644 --- a/misc/script/release.sh +++ b/misc/script/release.sh @@ -24,7 +24,6 @@ function build { echo "building $dirname..." 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)'" \ -gcflags=-trimpath="${PWD}" \ -asmflags=-trimpath="${PWD}" \