forked from cucumber/cucumber-jvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (36 loc) · 1.49 KB
/
Makefile
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
36
37
38
39
40
41
42
43
44
45
SHELL := /usr/bin/env bash
default:
mvn clean install
.PHONY: default
VERSION = $(shell mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout 2> /dev/null)
NEW_VERSION = $(subst -SNAPSHOT,,$(VERSION))
clean:
mvn clean release:clean
.PHONY: clean
version:
@echo ""
@echo "The next version of Cucumber-JVM will be $(NEW_VERSION)"
@echo ""
.PHONY: version
update-dependency-versions:
mvn versions:force-releases
mvn versions:update-properties -DallowMajorUpdates=false -Dmaven.version.rules="file://`pwd`/.m2/maven-version-rules.xml"
.PHONY: update-dependency-versions
update-major-dependency-versions:
mvn versions:force-releases
mvn versions:update-properties -DallowMajorUpdates=true -Dmaven.version.rules="file://`pwd`/.m2/maven-version-rules.xml"
.PHONY: update-major-dependency-versions
update-changelog:
cat CHANGELOG.md | ./scripts/update-changelog.sh $(NEW_VERSION) > CHANGELOG.md.tmp
mv CHANGELOG.md.tmp CHANGELOG.md
.PHONY: update-changelog
.commit-and-push-changelog:
git commit -am "Update CHANGELOG for v$(NEW_VERSION)"
git push
.PHONY: .commit-and-push-changelog
release: default update-changelog .commit-and-push-changelog
mvn --batch-mode release:clean release:prepare -DautoVersionSubmodules=true -Darguments="-DskipTests=true -DskipITs=true -Darchetype.test.skip=true"
git checkout "v$(NEW_VERSION)"
mvn deploy -P-examples -Psign-source-javadoc -DskipTests=true -DskipITs=true -Darchetype.test.skip=true
git checkout master
.PHONY: release