forked from K-Phoen/semver-release-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 626 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (27 loc) · 626 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
IMAGE=3bbbeau/gitea-semver-release-action
VERSION?=latest
.PHONY: lint
lint: vendor
docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:latest golangci-lint run -c .golangci.yaml
.PHONY: test
test: vendor
go test ./...
vendor: go.mod go.sum
go mod tidy
go mod vendor
.PHONY: build
build:
go build -o bumper
.PHONY: image
image:
docker build -f Dockerfile -t $(IMAGE):$(VERSION) .
.PHONY: push
push: image
docker push $(IMAGE):$(VERSION)
.PHONY: update_action
update_action:
sed "s/\*\*VERSION_PLACEHOLDER\*\*/$(VERSION)/" action.yml.dist > action.yml
.PHONY: clean
clean:
rm bumper
rm -rf vendor