summarylogtreecommitdiffstats
path: root/Makefile
blob: fe5ab4d219bf02ba2ecb3d0c51728a5e55a7cc5f (plain)
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

# This will update the checksums and build the package
all:
	updpkgsums
	makepkg --printsrcinfo > .SRCINFO
	makepkg -sr

# This will do the same as all, but will install it to the local system as well
install:
	updpkgsums
	makepkg --printsrcinfo > .SRCINFO
	makepkg -sri

system:
	ELECTRON=electron makepkg -sr

# This will update PKGBUILD with the latest version and build the package
update:
	sed 's/^pkgver=.*$$/pkgver=$(shell $(MAKE) versions | tail -n 1)/' -i PKGBUILD
	sed 's/^pkgrel=.*$$/pkgrel=1/' -i PKGBUILD
	$(MAKE)

# This will list the versions available in the Ubuntu repository
versions:
	curl -s https://www.typora.io/linux/Packages | perl -n -e '/^Version: (.*)-[0-9]+$$/ && print "$$1\n"' | sort -V | uniq

# This will remove the files downloaded and created in the build process
clean:
	rm -rf pkg src typora_*.deb typora-*.pkg.tar

publish:
	git add .
	git commit -m "Update to version $(shell $(MAKE) versions | tail -n 1)"
	git push
	git push aur master