Skip to content

Commit

Permalink
fix(devenv): Fix devenv rule in makefile.
Browse files Browse the repository at this point in the history
Remove call to unexisting rule `setup`. Set the Golang version in a variables, with the actual version. Set a safe directory to avoid `error obtaining VCS status: exit status 128`
  • Loading branch information
audig committed Apr 9, 2024
1 parent 87f505e commit 2a1feab
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
NAME := gitlab-ci-pipelines-exporter
FILES := $(shell git ls-files */*.go)
COVERAGE_FILE := coverage.out
REPOSITORY := mvisonneau/$(NAME)
.DEFAULT_GOAL := help
NAME := gitlab-ci-pipelines-exporter
FILES := $(shell git ls-files */*.go)
COVERAGE_FILE := coverage.out
REPOSITORY := mvisonneau/$(NAME)
.DEFAULT_GOAL := help
GOLANG_VERSION := 1.22

.PHONY: fmt
fmt: ## Format source code
Expand Down Expand Up @@ -70,8 +71,12 @@ dev-env: ## Build a local development environment using Docker
-v $(shell pwd):/go/src/github.com/mvisonneau/$(NAME) \
-w /go/src/github.com/mvisonneau/$(NAME) \
-p 8080:8080 \
golang:1.20 \
/bin/bash -c 'make setup; make install; bash'
golang:$(GOLANG_VERSION) \
/bin/bash -c '\
git config --global --add safe.directory $$(pwd);\
make install;\
bash\
'

.PHONY: is-git-dirty
is-git-dirty: ## Tests if git is in a dirty state
Expand Down

0 comments on commit 2a1feab

Please sign in to comment.