diff --git a/Makefile b/Makefile index 84b4bcb..dccea05 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,26 @@ VERSION := $(shell cat VERSION) ARCHIVE := sysz-$(VERSION).tar.gz -.PHONY: all install clean release +.PHONY: install clean release archive -sysz: VERSION CHANGELOG.md +sysz: VERSION sed -i -e "s/^SYSZ_VERSION=.*/SYSZ_VERSION=$(VERSION)/" sysz -$(ARCHIVE): VERSION CHANGELOG.md +$(ARCHIVE): sysz CHANGELOG.md README.md git archive --format=tar.gz -o $(ARCHIVE) --prefix sysz-$(VERSION)/ HEAD +clean: + /bin/rm -f README.md + +README.md: README.sh sysz VERSION + ./README.sh + +archive: $(ARCHIVE) + PKGBUILD: VERSION $(ARCHIVE) sed -i -e "s/^sha256sums=.*/sha256sums=('`sha256sum $(ARCHIVE) | cut -d' ' -f1`')/" PKGBUILD makepkg -f + +aur-release: PKGBUILD git commit -am 'Update PKGBUILD' git push origin master cp PKGBUILD ~/src/aur/sysz/PKGBUILD @@ -19,18 +29,13 @@ PKGBUILD: VERSION $(ARCHIVE) git commit -am "Release $(VERSION)" git push origin master -all: clean sysz $(ARCHIVE) - -release: all +github-release: VERSION sysz CHANGELOG.md README.md git commit -am 'Release $(VERSION)' git tag $(VERSION) git push origin $(VERSION) -clean: - /bin/rm -f README.md +release: clean sysz README.md github-release -README.md: README.sh sysz VERSION - ./README.sh install: install -m755 sysz /usr/local/bin/ diff --git a/PKGBUILD b/PKGBUILD index 89bdf5d..2253b6d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,7 +9,7 @@ url="https://github.com/joehillen/sysz" license=("UNLICENSE") depends=("bash" "fzf") source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz") -sha256sums=('948ef4bbff219fae9cea2cb630a6e5749d5163155e6a6825bf7e7607b8b30107') +sha256sums=('d9520e471dbb26da0046da1959e705fb70caee8e3dba9fd6c1963f8a6e9d6c70') package() { install -Dm775 "$srcdir/$pkgname-$pkgver/sysz" "$pkgdir/usr/bin/sysz"