diff options
author | zoorat | 2023-11-11 19:24:21 +0600 |
---|---|---|
committer | zoorat | 2023-11-11 19:24:21 +0600 |
commit | a6497b3d6a484b85be3246f6253ceef2af0816e9 (patch) | |
tree | 38a5e524ffc10b6c0c515832c0950f2cc70af1e2 | |
parent | ff8597d865ec8c39aa2789d231dfc193e1206747 (diff) | |
download | aur-a6497b3d6a484b85be3246f6253ceef2af0816e9.tar.gz |
adding better tooling
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 90 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | changelog.md | 20 |
5 files changed, 120 insertions, 5 deletions
@@ -1,12 +1,14 @@ pkgbase = ezshare pkgdesc = Easily share files, folders and clipboard over LAN - Like Google Drive but without internet pkgver = 1.9.0 - pkgrel = 2 + pkgrel = 3 url = https://github.com/mifi/ezshare - arch = any + changelog = changelog.md + arch = x86_64 license = MIT makedepends = npm makedepends = jq + depends = glibc depends = nodejs noextract = ezshare-1.9.0.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" @@ -3,18 +3,19 @@ _npmname=ezshare pkgname=$_npmname pkgver=1.9.0 -pkgrel=2 +pkgrel=3 pkgdesc="Easily share files, folders and clipboard over LAN - Like Google Drive but without internet" -arch=(any) +arch=("x86_64") url="https://github.com/mifi/ezshare" license=("MIT") -depends=("nodejs") +depends=("glibc" "nodejs") makedepends=("npm" "jq") # provides=("$_npmname") # conflicts=("$_npmname") options=(strip emptydirs zipman) +changelog="changelog.md" source=("https://registry.npmjs.org/${_npmname}/-/${_npmname}-${pkgver}.tgz") noextract=("${_npmname}-${pkgver}.tgz") diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000000..ce81df016086 --- /dev/null +++ b/changelog.md @@ -0,0 +1,20 @@ +# Name: +### URL: https://github.com/mifi/ezshare/releases/tag/v1.9.0 +### published at '2021-05-11T06:35:15Z' by mifi +--- +- require node 12 6f832f9
+- ui improvement 6ef80b7
+- improve error handling #29 9635f18
+- Merge pull request #26 from mifi/dependabot/npm_and_yarn/ezshare-frontend/elliptic-6.5.4 38ebb98
+- Merge pull request #27 from mifi/dependabot/npm_and_yarn/y18n-4.0.1 782d56f
+- Merge pull request #28 from mifi/dependabot/npm_and_yarn/ezshare-frontend/ssri-6.0.2 b15c1d5
+- Merge pull request #30 from mifi/dependabot/npm_and_yarn/ezshare-frontend/url-parse-1.5.1 1ef92aa
+- Merge pull request #31 from mifi/dependabot/npm_and_yarn/lodash-4.17.21 e76bc9c
+- Bump lodash from 4.17.19 to 4.17.21 7f0df16
+- Bump url-parse from 1.4.7 to 1.5.1 in /ezshare-frontend 9f679a7
+- Bump ssri from 6.0.1 to 6.0.2 in /ezshare-frontend a768d0b
+- Bump y18n from 4.0.0 to 4.0.1 46a8508
+- update funding 524be47
+- Bump elliptic from 6.5.3 to 6.5.4 in /ezshare-frontend d9e2a10
+
+https://github.com/mifi/ezshare/compare/v1.8.3...v1.9.0 |