forked from cloudscale-ch/cloudscale-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
23 lines (18 loc) · 761 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TEST?=$$(go list ./... |grep -v 'vendor')
VERSION ?= $(shell cat VERSION)
test:
go test -v $(TEST) $(TESTARGS) -timeout 30s
integration:
go clean -testcache # Force retesting of code
go test -tags=integration -v $(TEST)/test/integration/... $(TESTARGS) -timeout 120m
fmt:
go fmt
gofmt -l -w test/integration
bump-version:
@[ "${NEW_VERSION}" ] || ( echo "NEW_VERSION must be set (ex. make NEW_VERSION=v1.x.x bump-version)"; exit 1 )
@(echo ${NEW_VERSION} | grep -E "^v") || ( echo "NEW_VERSION must be a semver ('v' prefix is required)"; exit 1 )
@echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
@echo $(NEW_VERSION) > VERSION
@sed -i.bak -e 's/${VERSION}/${NEW_VERSION}/g' cloudscale.go
@rm cloudscale.go.bak
.PHONY: test integration