-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
40 lines (31 loc) · 974 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
# store the current working directory
NAME := tendrl-ui
VERSION := 1.6.3
RELEASE := 10
COMMIT := $(shell git rev-parse HEAD)
SHORTCOMMIT := $(shell echo $(COMMIT) | cut -c1-7)
all: srpm
build-pkgs-dist:
npm prune
npm install
tar -zcf tendrl-ui-build-pkgs.tar.gz node_modules
dist:
mkdir -p $(NAME)-$(VERSION)
cp *.js package.json LICENSE README.md $(NAME)-$(VERSION)/
cp -r docs $(NAME)-$(VERSION)/
cp -r src $(NAME)-$(VERSION)/
tar -zcf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)
clean:
rm -f $(NAME)-$(VERSION).tar.gz
rm -f $(NAME)-$(VERSION)*.rpm
rm -f *.log
srpm: dist build-pkgs-dist
fedpkg --dist epel7 srpm
rpm: srpm
mock -r epel-7-x86_64 rebuild $(NAME)-$(VERSION)-$(RELEASE).el7.src.rpm --resultdir=. --define "dist .el7"
gitversion:
sed -i $(NAME).spec \
-e "/^Release:/cRelease: $(shell date +"%Y%m%dT%H%M%S").$(SHORTCOMMIT)"
snapshot: gitversion srpm
.PHONY: dist rpm srpm gitversion snapshot