set revision to current timestamp
[null-analysis.git] / Makefile
blobe7bfe839096db6d5804426050644834ea7e0d630
1 # https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html#Makefile-Basics
2 SHELL = /bin/sh
4 timestamp := $(shell /bin/date "+%Y%m%d%H%M%S")
6 all: help
8 help:
9 @echo ""
10 @echo "-- Help Menu"
11 @echo ""
12 @echo " 1. make sonar-analysis - perform sonar analysis"
13 @echo " 2. make sign-waiver - GPG sign the WAIVER"
14 @echo " 3. make release - perform the next release"
15 @echo " 4. make docker-verify - verify the project inside a pre-defined docker container"
17 .PHONY: sonar-analysis
18 sonar-analysis:
19 # http://docs.sonarqube.org/display/SONAR/Analyzing+with+Maven
20 @mvn clean install
21 @mvn sonar:sonar -Dsonar.host.url=http://localhost:59000 -Dsonar.pitest.mode=reuseReport
23 .PHONY: sign-waiver
24 sign-waiver:
25 @gpg2 --no-version --armor --sign AUTHORS/WAIVER
27 .PHONY: release
28 release:
29 @mvn release:prepare release:perform
31 .PHONY: docker-verify
32 docker-verify:
33 @docker-compose -f build/docker/build-environment.yml run --rm --user=$(UID) build
34 # findbugs likes to create these
35 @rm -rf ?/
37 .PHONY: update-parent
38 update-parent: ##@maintenance Updates the Maven parent to its latest version
39 @mvn versions:update-parent -U -DgenerateBackupPoms=false
40 @git add pom.xml
41 @git commit pom.xml -s -m 'Update to latest parent'
43 .PHONY: release-into-local-nexus
44 release-into-local-nexus: ##@release Releases all artifacts into a local nexus
45 @mvn clean deploy scm:tag -Prelease -Drevision=$(timestamp) -DpushChanges=false -DskipLocalStaging=true -Drelease=local
47 .PHONY: release-into-sonatype-nexus
48 release-into-sonatype-nexus: ##@release Releases all artifacts into Maven Central (through Sonatype OSSRH)
49 @mvn clean deploy scm:tag -Prelease -Drevision=$(timestamp) -DpushChanges=false -Drelease=sonatype
50 @git push --tags origin master