-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
28 lines (22 loc) · 1013 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
.PHONY: help error-pages dist config-nginx orig
help:
@echo "changelog - prepare debian/chanelog file with the new version number"
@echo "error-pages - use kolibri command to create all the error pages and its translations"
@echo "release - prepare a release"
@echo "dist - package"
@echo "orig - creates ../kolibri-server_n.n.n.orig.tar.gz"
@echo $(shell dpkg-parsechangelog -SVersion)
error-pages:
rm -Rf $(CURDIR)/error_pages
kolibri manage loadingpage --reload --output-dir $(CURDIR)/error_pages --version-text $(shell dpkg-parsechangelog -SVersion)
changelog:
dch -i
release: changelog error-pages orig
dist: orig
dpkg-buildpackage -S -us -uc
# Solution from: https://stackoverflow.com/a/43145972/405682
VERSION:=$(shell dpkg-parsechangelog -S Version | sed -rne 's,([^-\+]+)+(\+dfsg)*.*,\1,p'i)
UPSTREAM_PACKAGE:=kolibri-server_${VERSION}.orig.tar.gz
orig:
@echo "Creating .orig tarball: ../${UPSTREAM_PACKAGE}"
@tar --exclude=".git" -czf ../${UPSTREAM_PACKAGE} -C .. $(notdir $(CURDIR))