forked from omid/Persian-Calendar-for-Gnome-Shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (48 loc) · 1.65 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
# Basic Makefile
_UUID = PersianCalendar@oxygenws.com
_BASE_MODULES = $(_UUID)/*
ifeq ($(strip $(DESTDIR)),)
_INSTALL_BASE = $(HOME)/.local/share/gnome-shell/extensions
else
_INSTALL_BASE = $(DESTDIR)/usr/share/gnome-shell/extensions
endif
_INSTALL_NAME = PersianCalendar@oxygenws.com
_OLD_VERSION = $(shell jq '.version' $(_UUID)/metadata.json)
_NEW_VERSION = $(shell echo $$(($(_OLD_VERSION)+1)))
install-local: _build
rm -rf $(_INSTALL_BASE)/$(_INSTALL_NAME)
mkdir -p $(_INSTALL_BASE)/$(_INSTALL_NAME)
cp -r ./_build/* $(_INSTALL_BASE)/$(_INSTALL_NAME)/
-rm -fR _build
echo done
compile-gschema: ./$(_UUID)/schemas/gschemas.compiled
clean:
rm -f ./$(_UUID)/schemas/gschemas.compiled
./$(_UUID)/schemas/gschemas.compiled: ./$(_UUID)/schemas/org.gnome.shell.extensions.persian-calendar.gschema.xml
glib-compile-schemas ./$(_UUID)/schemas/
release: eslint _build
sed -i 's/"version": $(_OLD_VERSION)/"version": $(_NEW_VERSION)/' $(_UUID)/metadata.json;
gitg
git commit -v
git push
cd _build ; \
zip -qr "$(_UUID)$(_NEW_VERSION).zip" .
mv _build/$(_UUID)$(_NEW_VERSION).zip ./
-rm -fR _build
eslint:
eslint --fix PersianCalendar@oxygenws.com
_build: compile-gschema #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 ../PersianCalendar@oxygenws.com/locale;
tailLog:
sudo journalctl -f -g $(_UUID)