-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Makefile
118 lines (94 loc) · 3.95 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
# Makefile for MoinMoin
#
# location for the wikiconfig.py we use for testing:
export PYTHONPATH=$(PWD)
testwiki := ./tests/wiki
share := ./wiki
all:
python setup.py build
install-docs:
-mkdir build
wget -U MoinMoin/Makefile -O build/INSTALL.html "https://master19.moinmo.in/InstallDocs?action=print"
sed \
-e 's|https://master19.moinmo.in/moin_static..|../MoinMoin/web/static/htdocs|g' \
-e 's|https://static.moinmo.in/moin_static..|../MoinMoin/web/static/htdocs|g' \
-e 's|/moin_static..|../MoinMoin/web/static/htdocs|g' \
-e 's|/InstallDocs#|#|g' \
-e 's|/InstallDocs/QuickInstall#qdlinux|#InstallDocs.2BAC8-QuickInstall.2BAC8-Linux.Linux:_Detailed_Quick_Installation|g' \
-e 's|/InstallDocs/QuickInstall#qdmac|#InstallDocs.2BAC8-QuickInstall.2BAC8-MacOSX.Mac:_Detailed_Quick_Installation|g' \
-e 's|/InstallDocs/QuickInstall#qdwindows|#InstallDocs.2BAC8-QuickInstall.2BAC8-Windows.Windows:__Detailed_Quick_Installation|g' \
build/INSTALL.html >docs/INSTALL.html
-rm build/INSTALL.html
wget -U MoinMoin/Makefile -O build/UPDATE.html "https://master19.moinmo.in/HelpOnUpdating?action=print"
sed \
-e 's|https://master19.moinmo.in/moin_static..|../MoinMoin/web/static/htdocs|g' \
-e 's|https://static.moinmo.in/moin_static..|../MoinMoin/web/static/htdocs|g' \
-e 's|/moin_static..|../MoinMoin/web/static/htdocs|g' \
-e 's|href=./MoinMoin|href=\"https://master19.moinmo.in/MoinMoin|g' \
-e 's|href=./EditedSystemPages|href=\"https://master19.moinmo.in/EditedSystemPages|g' \
build/UPDATE.html >docs/UPDATE.html
-rm build/UPDATE.html
-rmdir build
interwiki:
wget -U MoinMoin/Makefile -O $(share)/data/intermap.txt "https://master19.moinmo.in/InterWikiMap?action=raw"
chmod 664 $(share)/data/intermap.txt
check-tabs:
@python -c 'import tabnanny ; tabnanny.check("MoinMoin")'
# Create documentation
epydoc: patchlevel
@epydoc --parse-only -o ../html-1.9 --name=MoinMoin --url=https://moinmo.in/ MoinMoin
# Create new underlay directory from MoinMaster
# Should be used only on TW machine
underlay:
rm -rf $(share)/underlay
MoinMoin/script/moin.py --config-dir=/srv/cfg/1.9 --wiki-url=https://master19.moinmo.in/ maint globaledit
MoinMoin/script/moin.py --config-dir=/srv/cfg/1.9 --wiki-url=https://master19.moinmo.in/ maint reducewiki --target-dir=$(share)/underlay
rm -rf $(share)/underlay/pages/InterWikiMap
rm -rf $(share)/underlay/pages/MoinPagesEditorGroup
cd $(share); rm -f underlay.tar; tar cf underlay.tar underlay
pagepacks:
@python MoinMoin/_tests/maketestwiki.py
@MoinMoin/script/moin.py --config-dir=MoinMoin/_tests --wiki-url=http://localhost/ maint mkpagepacks
cd $(share) ; rm -rf underlay
cp -a $(testwiki)/underlay $(share)/
dist-clean:
-rm MANIFEST
-rm -rf tests/wiki
-rm -rf wiki/data/cache/{__metalock__,__session__,wikiconfig}
->wiki/data/event-log
->wiki/data/edit-log
dist: dist-clean
python setup.py sdist
dist-release: dist-clean
python setup.py register sdist upload --identity="Thomas Waldmann" --sign
# Create patchlevel module
patchlevel:
@echo patchlevel = "\"`git describe --abbrev=12 --always --dirty=+`\"\n" >MoinMoin/patchlevel.py
@MoinMoin/version.py update
# Report translations status
check-i18n:
MoinMoin/i18n/tools/check_i18n.py
# Update the workdir from the default pull repo
update:
git pull
$(MAKE) patchlevel
# Update underlay directory from the tarball
update-underlay:
cd $(share); rm -rf underlay; tar xf underlay.tar
test:
./pytest MoinMoin/ --ignore MoinMoin/support/
coverage:
@python MoinMoin/_tests/maketestwiki.py
@python -u -m trace --count --coverdir=cover --missing tests/runtests.py
pylint:
@pylint --disable-msg=W0142,W0511,W0612,W0613,C0103,C0111,C0302,C0321,C0322 --disable-msg-cat=R MoinMoin
clean: clean-testwiki clean-pyc
rm -rf build
clean-testwiki:
rm -rf $(testwiki)/*
clean-pyc:
find . -name "*.pyc" -exec rm -rf "{}" \;
.PHONY: all dist install-docs check-tabs epydoc underlay patchlevel \
check-i18n update update-underlay test testwiki clean \
clean-testwiki clean-pyc