-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 782 Bytes
/
Makefile
File metadata and controls
35 lines (28 loc) · 782 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
all: test
# Run tests.
test:
go test -v ./...
# Push the git tag.
git-push-tag: VERSION=$(shell cat VERSION)
git-push-tag:
git push origin ${VERSION}
# Add the tag.
git-tag-release: VERSION=$(shell cat VERSION)
git-tag-release: check-release-version
git tag --annotate ${VERSION} --message "go-certcentral ${VERSION}"
# Check whether the tag exists already.
check-release-version: VERSION=$(shell cat VERSION)
check-release-version:
if test x$$(git tag --list ${VERSION}) != x; \
then \
echo "Tag [${VERSION}] already exists. Please check the working copy."; git diff . ; exit 1;\
fi
# Tag a new release of the library.
release: VERSION=$(shell cat VERSION)
release: git-tag-release git-push-tag
# Clean up
clean:
rm -rf vendor
.PHONY: vendor
vendor:
go mod vendor