Compare commits
3 Commits
de8cbefb8e
...
v1.3.3
| Author | SHA1 | Date | |
|---|---|---|---|
| f85abd43c4 | |||
| 0f66ebf52a | |||
| 55a515ccd5 |
@@ -7,6 +7,7 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'packaging/AUR/PKGBUILD.git'
|
- 'packaging/AUR/PKGBUILD.git'
|
||||||
- 'packaging/AUR/.SRCINFO.git'
|
- 'packaging/AUR/.SRCINFO.git'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-aur-git:
|
publish-aur-git:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ name: Release Standalone Builder
|
|||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -103,3 +104,37 @@ jobs:
|
|||||||
commit_email: ${{ github.actor }}@users.noreply.github.com
|
commit_email: ${{ github.actor }}@users.noreply.github.com
|
||||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||||
commit_message: "Update kewt-bin to ${{ github.ref_name }}"
|
commit_message: "Update kewt-bin to ${{ github.ref_name }}"
|
||||||
|
|
||||||
|
publish-homebrew:
|
||||||
|
runs-on: local
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Render Formula and push to GitHub
|
||||||
|
run: |
|
||||||
|
TAG="${GITHUB_REF#refs/tags/}"
|
||||||
|
VERSION="${TAG#v}"
|
||||||
|
|
||||||
|
curl -sL -o kewt-binary \
|
||||||
|
"https://git.krzak.org/N0VA/kewt/releases/download/${TAG}/kewt"
|
||||||
|
CHECKSUM=$(sha256sum kewt-binary | awk '{print $1}')
|
||||||
|
rm -f kewt-binary
|
||||||
|
|
||||||
|
mkdir -p brew-work/Formula
|
||||||
|
sed -e "s/VERSION_PLACEHOLDER/${VERSION}/g" \
|
||||||
|
-e "s/SHA256SUM_PLACEHOLDER/${CHECKSUM}/g" \
|
||||||
|
packaging/homebrew/kewt.rb.template > brew-work/Formula/kewt.rb
|
||||||
|
|
||||||
|
cd brew-work
|
||||||
|
git init
|
||||||
|
git remote add origin https://x-access-token:${{ secrets.GH_RELEASE_TOKEN }}@github.com/n0va-bot/homebrew-tap.git
|
||||||
|
git fetch origin main || true
|
||||||
|
git checkout main 2>/dev/null || git checkout --orphan main
|
||||||
|
|
||||||
|
git add Formula/kewt.rb
|
||||||
|
git config user.name "${{ github.actor }}"
|
||||||
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||||
|
git commit -m "Update kewt to ${TAG}" || echo "No changes to commit"
|
||||||
|
git push origin main
|
||||||
|
|||||||
19
Makefile
Normal file
19
Makefile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
PREFIX ?= /usr/local
|
||||||
|
BINDIR = $(PREFIX)/bin
|
||||||
|
|
||||||
|
all: kewt
|
||||||
|
|
||||||
|
kewt:
|
||||||
|
./tools/build-standalone.sh
|
||||||
|
|
||||||
|
install: kewt
|
||||||
|
install -d $(DESTDIR)$(BINDIR)
|
||||||
|
install -m 755 kewt $(DESTDIR)$(BINDIR)/kewt
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f $(DESTDIR)$(BINDIR)/kewt
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f kewt
|
||||||
|
|
||||||
|
.PHONY: all install uninstall clean
|
||||||
7
package.json
Normal file
7
package.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "kewt",
|
||||||
|
"description": "A minimalist static site generator inspired by werc",
|
||||||
|
"global": "true",
|
||||||
|
"install": "make install",
|
||||||
|
"scripts": ["kewt"]
|
||||||
|
}
|
||||||
16
packaging/homebrew/kewt.rb.template
Normal file
16
packaging/homebrew/kewt.rb.template
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
class Kewt < Formula
|
||||||
|
desc "Minimalist static site generator inspired by werc"
|
||||||
|
homepage "https://kewt.krzak.org"
|
||||||
|
url "https://github.com/n0va-bot/kewt/releases/download/VERSION_PLACEHOLDER/kewt"
|
||||||
|
sha256 "SHA256SUM_PLACEHOLDER"
|
||||||
|
license "ISC"
|
||||||
|
version "VERSION_PLACEHOLDER"
|
||||||
|
|
||||||
|
def install
|
||||||
|
bin.install "kewt"
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
system "#{bin}/kewt", "--version"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -26,7 +26,7 @@ exit $?
|
|||||||
#==PAYLOAD==
|
#==PAYLOAD==
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "standalone")
|
VERSION=$(git describe --tags 2>/dev/null || echo "standalone")
|
||||||
tmpbuild=$(mktemp -d)
|
tmpbuild=$(mktemp -d)
|
||||||
cp -r "$REPO_ROOT/kewt.sh" "$REPO_ROOT/markdown.sh" "$REPO_ROOT/awk" "$REPO_ROOT/styles" "$tmpbuild/"
|
cp -r "$REPO_ROOT/kewt.sh" "$REPO_ROOT/markdown.sh" "$REPO_ROOT/awk" "$REPO_ROOT/styles" "$tmpbuild/"
|
||||||
sed -e "s/kewt version git/kewt version $VERSION/" "$tmpbuild/kewt.sh" > "$tmpbuild/kewt.sh.tmp" && mv "$tmpbuild/kewt.sh.tmp" "$tmpbuild/kewt.sh"
|
sed -e "s/kewt version git/kewt version $VERSION/" "$tmpbuild/kewt.sh" > "$tmpbuild/kewt.sh.tmp" && mv "$tmpbuild/kewt.sh.tmp" "$tmpbuild/kewt.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user