-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
41 lines (32 loc) · 1011 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# A simple makefile for compiling three java classes
#
# define a makefile variable for the java compiler
#
BUILDER = ./build
VERSION = $(shell git describe --abbrev=0 --tags)
NEXT_VERSION = $(shell echo "$(VERSION)" | awk -F. -v OFS=. 'NF==1{print ++$$NF}; NF>1{if(length($$NF+1)>length($$NF))$$(NF-1)++; $$NF=sprintf("%0*d", length($$NF), ($$NF+1)%(10^length($$NF))); print}')
PHAR_FILE = jira.phar
INSTALL_DEST = /usr/local/bin/jira
# typing 'make' will invoke the first target entry in the makefile
# (the default one in this case)
#
default: jira.phar
# this target entry builds the Average class
#
jira.phar:
@echo Building $(VERSION)
$(BUILDER) $(VERSION)
install: jira.phar
@cp $(PHAR_FILE) $(INSTALL_DEST)
release:
@echo $(NEXT_VERSION)
git tag $(NEXT_VERSION)
push:
git push -u && git push --tags --no-verify
incremental-release: release push
# To start over from scratch, type 'make clean'.
# Removes all .phar files, so that the next make rebuilds them
#
clean:
$(RM) $(PHAR_FILE)