forked from PGBuildFarm/client-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (45 loc) · 1.75 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright (c) 2003-2010, Andrew Dunstan
# See accompanying License file for license details
ALLPERLFILES = $(shell find . -path ./sandbox -prune -o \( -name '*.pl' -o -name '*.pm' \) -print | sed 's!\./!!') build-farm.conf.sample
# these are the explicitly selected perl files that will go in a
# release tarball
PERLFILES = run_build.pl run_web_txn.pl run_branches.pl \
update_personality.pl setnotes.pl \
build-farm.conf.sample \
PGBuild/SCM.pm PGBuild/Options.pm PGBuild/WebTxn.pm PGBuild/Utils.pm \
PGBuild/Modules/Skeleton.pm \
PGBuild/Modules/TestUpgrade.pm \
PGBuild/Modules/FileTextArrayFDW.pm PGBuild/Modules/BlackholeFDW.pm \
PGBuild/Modules/TestDecoding.pm \
PGBuild/Modules/TestCollateLinuxUTF8.pm \
PGBuild/Modules/TestSepgsql.pm \
PGBuild/Modules/TestUpgradeXversion.pm \
PGBuild/Modules/TestICU.pm
OTHERFILES = License README
RELEASE_FILES = $(PERLFILES) $(OTHERFILES)
ALLFILES = $(ALLPERLFILES) $(OTHERFILES)
CREL := $(if $(REL),$(strip $(subst .,_, $(REL))),YOU_NEED_A_RELEASE)
.PHONY: tag
tag:
@test -n "$(REL)" || (echo Missing REL && exit 1)
sed -i -e "s/VERSION = '[^']*';/VERSION = 'REL_$(REL)';/" $(ALLFILES)
git commit -a -m 'Mark Release '$(REL)
git tag -m 'Release $(REL)' REL_$(CREL)
@echo Now do: git push --tags origin master
.PHONY: release
release:
@test -n "$(REL)" || (echo Missing REL && exit 1)
@echo REL = $(CREL)
tar -z --xform="s,^,build-farm-$(REL)/,S" $(RELEASE_FILES) -cf releases/build-farm-$(CREL).tgz
copyright:
./make_copyright.sh
syncheck:
for f in $(ALLPERLFILES) ; do perl -cw $${f}; done;
tidy:
perltidy $(ALLPERLFILES)
critic:
perlcritic -3 --theme core $(ALLPERLFILES)
clean:
find . "(" -name '*.bak' -o -name '*.orig' -o -name '*~' ")" -type f -exec rm -f {} \;
show:
@echo $(ALLPERLFILES)