From 11285680a78e4f353a8a459356ea75f522ae662a Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Mon, 23 Dec 2024 10:35:36 +0300 Subject: [PATCH 1/3] docs: update configuration README --- docs/mdbook/configuration/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/mdbook/configuration/README.md b/docs/mdbook/configuration/README.md index 9513bd1b..9dca48a8 100644 --- a/docs/mdbook/configuration/README.md +++ b/docs/mdbook/configuration/README.md @@ -42,6 +42,28 @@ Lefthook also merges an extra config with the name `lefthook-local`. All support - [`exclude_tags`](./exclude_tags.md) - [`skip`](./skip.md) - [`only`](./only.md) + - [`jobs`](./jobs.md) + - [`name`](./name.md) + - [`run`](./run.md) + - [`script`](./script.md) + - [`runner`](./runner.md) + - [`group`](./group.md) + - [`parallel`](./parallel.md) + - [`piped`](./piped.md) + - [`jobs`](./jobs.md) + - [`skip`](./skip.md) + - [`only`](./only.md) + - [`tags`](./tags.md) + - [`glob`](./glob.md) + - [`files`](./files.md) + - [`file_types`](./file_types.md) + - [`env`](./env.md) + - [`root`](./root.md) + - [`exclude`](./exclude.md) + - [`fail_text`](./fail_text.md) + - [`stage_fixed`](./stage_fixed.md) + - [`interactive`](./interactive.md) + - [`use_stdin`](./use_stdin.md) - [`commands`](./Commands.md) - [`run`](./run.md) - [`skip`](./skip.md) From 7d7da7571a573a0cba36c0b9819741d0cb69b7be Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Mon, 23 Dec 2024 10:37:06 +0300 Subject: [PATCH 2/3] packages: set AUR dependency for Go >= 1.23 --- packaging/aur/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/aur/PKGBUILD b/packaging/aur/PKGBUILD index 6d6411a1..33fc7649 100644 --- a/packaging/aur/PKGBUILD +++ b/packaging/aur/PKGBUILD @@ -7,7 +7,7 @@ pkgrel=1 arch=('x86_64' 'aarch64') url="https://github.com/evilmartians/lefthook" license=('MIT') -makedepends=('go>=1.21' 'rsync') +makedepends=('go>=1.23' 'rsync') source=("https://github.com/evilmartians/lefthook/archive/v${pkgver}.tar.gz") sha256sums=('{{ sha256sum }}') From f3ab494f03de90e80755568c6bdd1f67b09061e6 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Mon, 23 Dec 2024 17:54:34 +0300 Subject: [PATCH 3/3] ci: fix aur build (#905) * ci: fix aur build * fix: remove sources (Github already provides them) --- .github/workflows/release.yml | 5 ----- .goreleaser.yml | 6 ------ packaging/aur/PKGBUILD | 2 +- packaging/pack.rb | 7 ++++--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1392753b..9a653e8a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -204,11 +204,6 @@ jobs: with: fetch-depth: 0 - - uses: actions/download-artifact@v4 - with: - name: dist - - run: tar -xvf dist.tar - - name: Update AUR package run: | pacman -Syu --noconfirm diff --git a/.goreleaser.yml b/.goreleaser.yml index b24437fb..43076370 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -93,12 +93,6 @@ archives: {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} - -source: - enabled: true - name_template: "{{ .ProjectName }}_source" - format: "tar.gz" - checksum: name_template: "{{ .ProjectName }}_checksums.txt" algorithm: sha256 diff --git a/packaging/aur/PKGBUILD b/packaging/aur/PKGBUILD index 33fc7649..9eb11de0 100644 --- a/packaging/aur/PKGBUILD +++ b/packaging/aur/PKGBUILD @@ -7,7 +7,7 @@ pkgrel=1 arch=('x86_64' 'aarch64') url="https://github.com/evilmartians/lefthook" license=('MIT') -makedepends=('go>=1.23' 'rsync') +makedepends=('go>=1.23') source=("https://github.com/evilmartians/lefthook/archive/v${pkgver}.tar.gz") sha256sums=('{{ sha256sum }}') diff --git a/packaging/pack.rb b/packaging/pack.rb index 1b81ff4d..e33e3cfe 100755 --- a/packaging/pack.rb +++ b/packaging/pack.rb @@ -2,6 +2,7 @@ require "fileutils" require "digest" +require "open-uri" VERSION = "1.10.0" @@ -169,17 +170,17 @@ def publish_aur pkgbuild_dest = File.join(aur_repo, "PKGBUILD") cp(pkgbuild_source, pkgbuild_dest, verbose: true) - cd(aur_repo) - sha256 = Digest::SHA256.new - File.open(File.join(DIST, 'lefthook_source.tar.gz'), 'rb') do |file| + URI.open("https://github.com/evilmartians/lefthook/archive/v#{VERSION}.tar.gz") do |file| while chunk = file.read(1024) # Read the file in chunks sha256.update(chunk) end end + sha256sum = sha256.hexdigest replace_in_file(pkgbuild_dest, /{{ sha256sum }}/, sha256sum) + cd(aur_repo) system("makepkg --printsrcinfo > .SRCINFO") system("makepkg") system("makepkg --install")