diff options
author | zoorat | 2023-11-11 17:30:29 +0600 |
---|---|---|
committer | zoorat | 2023-11-11 17:30:29 +0600 |
commit | a3365785277923895a73c02eeffb9cf443ac992f (patch) | |
tree | 72449eb9731256b36a5d21c7998b1c7cff9fd879 | |
parent | 150678ebd2c77f617b885b67cf1f8df32bd29ce1 (diff) | |
download | aur-a3365785277923895a73c02eeffb9cf443ac992f.tar.gz |
adding better tooling
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 90 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | changelog.md | 14 |
5 files changed, 112 insertions, 3 deletions
@@ -1,13 +1,15 @@ pkgbase = alacritty-themes pkgdesc = A utility for choosing and applying Alacritty terminal themes. pkgver = 5.3.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/rajasegar/alacritty-themes + changelog = changelog.md arch = any license = MIT makedepends = npm makedepends = jq makedepends = icu + depends = sh depends = nodejs noextract = alacritty-themes-5.3.1.tgz options = strip diff --git a/.gitignore b/.gitignore index f71c635dafda..fd1cf73e6413 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ * !.gitignore +!Makefile !PKGBUILD !.SRCINFO +!changelog.md diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..ffa42df81816 --- /dev/null +++ b/Makefile @@ -0,0 +1,90 @@ +MAKEFLAGS += --warn-undefined-variables +SHELL=/bin/bash + +REPO = $(shell grep url .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]') +VERSION = $(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]') +TRASH = $(shell git check-ignore * | tr '\n' ' ') + +# DEFAULT +all: clean log sum build check pre clean + +# just build the package +build: + makepkg -sfr + +# build and install the package +install: + makepkg --install + +# update checksums +sum: + updpkgsums + +# check/lint +check: + @echo "shellcheck: " + shellcheck -e SC2148 -e SC2034 PKGBUILD || exit 0 + + @echo "shell formate: " + shfmt -d PKGBUILD || exit 0 + + @echo "checking PKGBUILD: " + namcap -i PKGBUILD + + @echo "checking build: " + namcap -i *.pkg.* + +# clean up the mess +clean: +ifeq ($(strip $(TRASH)),) + @echo "nothing to clear" +else + file $(TRASH) + @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \ + trash-put -v $(TRASH) ; \ + exit 0 ; \ + fi +endif + +# generate `changelog.md` +log: + @echo "wait, it will take some time" + $(eval NAME := $(shell gh release --repo $(REPO) view --json name | jq -r .name)) + echo "# Name: $(NAME) " >changelog.md + $(eval URL := $(shell gh release --repo $(REPO) view --json url | jq -r .url)) + echo "### URL: $(URL)" >>changelog.md + $(eval PUBLISHED_AT := $(shell gh release --repo $(REPO) view --json publishedAt | jq -r .publishedAt)) + $(eval AUTHOR := $(shell gh release --repo $(REPO) view --json author | jq -r .author.login)) + echo "### published at '$(PUBLISHED_AT)' by $(AUTHOR)" >>changelog.md + echo "---" >>changelog.md + gh release --repo $(REPO) view --json body | jq -r .body >>changelog.md + +# prepare for commit +pre: + shfmt -w PKGBUILD + makepkg --printsrcinfo > .SRCINFO + + git diff + + git add PKGBUILD + git add changelog.md + git add .SRCINFO + git add .gitignore + git add Makefile + +# commit with version bump message +commit: + $(eval VERSION := $(shell read -p "enter version (pkgver=$(VERSION)): " enter ; echo $${enter})) + @echo "commit message: \"updating to v$(VERSION)\"" + + @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \ + git diff --cached ; \ + exit 0 ; \ + fi + + @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \ + git commit -m "updating to v$(VERSION)" ; \ + exit 0 ; \ + fi + + @echo "recheck everything before pushing to AUR" @@ -5,18 +5,19 @@ _npmname=alacritty-themes pkgname=$_npmname pkgver=5.3.1 -pkgrel=1 +pkgrel=2 pkgdesc="A utility for choosing and applying Alacritty terminal themes." arch=(any) url="https://github.com/rajasegar/alacritty-themes" license=("MIT") -depends=("nodejs") +depends=("sh" "nodejs") makedepends=("npm" "jq" "icu") # provides=("$_npmname") # conflicts=("$_npmname") options=(strip emptydirs zipman) +changelog="changelog.md" source=("https://registry.npmjs.org/${_npmname}/-/${_npmname}-${pkgver}.tgz" "https://raw.githubusercontent.com/rajasegar/alacritty-themes/master/LICENSE") diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000000..3affe53b1184 --- /dev/null +++ b/changelog.md @@ -0,0 +1,14 @@ +# Name: v5.3.1 +### URL: https://github.com/rajasegar/alacritty-themes/releases/tag/v5.3.1 +### published at '2022-11-23T00:47:05Z' by rajasegar +--- +## [5.3.1](https://github.com/rajasegar/alacritty-themes/compare/v5.3.0...v5.3.1) (2022-11-23) + + +### Bug Fixes + +* Config warning: bar has been deprecated; use `colors.footer_bar` instead ([#203](https://github.com/rajasegar/alacritty-themes/issues/203)) ([cda1555](https://github.com/rajasegar/alacritty-themes/commit/cda1555030801210f017086b1c2cf839a3351f6f)) + + + + |