forked from omid/Persian-Calendar-for-Gnome-Shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (50 loc) · 1.63 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
# Basic Makefile
UUID = [email protected]
BASE_MODULES = $(UUID)/*
ifeq ($(strip $(DESTDIR)),)
INSTALLBASE = $(HOME)/.local/share/gnome-shell/extensions
else
INSTALLBASE = $(DESTDIR)/usr/share/gnome-shell/extensions
endif
INSTALLNAME = [email protected]
OLD_VERSION = $(shell jq '.version' $(UUID)/metadata.json)
NEW_VERSION = $(shell echo $$(($(OLD_VERSION)+1)))
all: extension
clean:
rm -f ./$(UUID)/schemas/gschemas.compiled
extension: ./$(UUID)/schemas/gschemas.compiled
./$(UUID)/schemas/gschemas.compiled: ./$(UUID)/schemas/org.gnome.shell.extensions.persian-calendar.gschema.xml
glib-compile-schemas ./$(UUID)/schemas/
install: install-local
install-local: _build
rm -rf $(INSTALLBASE)/$(INSTALLNAME)
mkdir -p $(INSTALLBASE)/$(INSTALLNAME)
cp -r ./_build/* $(INSTALLBASE)/$(INSTALLNAME)/
-rm -fR _build
echo done
release: eslint _build
sed -i 's/"version": $(OLD_VERSION)/"version": $(NEW_VERSION)/' $(UUID)/metadata.json;
cd _build ; \
zip -qr "$(UUID)$(NEW_VERSION).zip" .
mv _build/$(UUID)$(NEW_VERSION).zip ./
gitg
git commit -v
git push
-rm -fR _build
eslint:
eslint [email protected]
_build: all #update-translation
-rm -fR ./_build
mkdir -p _build
cp -r $(BASE_MODULES) _build
# mkdir -p _build/locale
# cp -r $(UUID)/locale/* _build/locale/
mkdir -p _build/schemas
cp $(UUID)/schemas/*.xml _build/schemas/
cp $(UUID)/schemas/gschemas.compiled _build/schemas/
sed -i 's/"version": $(OLD_VERSION)/"version": $(NEW_VERSION)/' _build/metadata.json;
#update-translation: all
# cd po; \
# ./compile.sh ../[email protected]/locale;
tailLog:
sudo journalctl -f -g $(UUID)