1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-22 21:01:36 +03:00

Automate updating linuxbrew tap

refs: https://github.com/wez/wezterm/issues/239
This commit is contained in:
Wez Furlong 2020-07-05 09:40:28 -07:00
parent ab1e83c7eb
commit 573f2435c8
6 changed files with 59 additions and 1 deletions

View File

@ -88,3 +88,17 @@ jobs:
commit_email: "wez@wezfurlong.org"
ssh_private_key: "${{ secrets.AUR_SSH_PRIVATE_KEY }}"
commit_message: "Automated update to match latest tag"
- name: "Checkout linuxbrew tap"
uses: actions/checkout@v2
with:
repository: "wez/homebrew-wezterm-linuxbrew"
path: "linuxbrew-wezterm"
token: "${{ secrets.GH_PAT }}"
- name: "Update linuxbrew tap formula"
shell: bash
run: "cp wezterm-linuxbrew.rb linuxbrew-wezterm/Formula/wezterm.rb"
- name: "Commit linuxbrew tap changes"
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Automated update to match latest tag"
repository: "linuxbrew-wezterm"

1
.gitignore vendored
View File

@ -17,3 +17,4 @@
/WezTerm*.AppImage
/WezTerm*.AppImage.zsync
/wezterm*-src.tar.gz
/wezterm-linuxbrew.rb

View File

@ -40,4 +40,5 @@ OUTPUT="$OUTPUT" \
# Update the AUR build file. We only really want to use this for tagged
# builds but it doesn't hurt to generate it always here.
SHA256=$(sha256sum $OUTPUT | cut -d' ' -f1)
sed -e "s/@TAG@/$TAG_NAME/" -e "s/@SHA256@/$SHA256/" < ci/PKGBUILD.template > PKGBUILD
sed -e "s/@TAG@/$TAG_NAME/g" -e "s/@SHA256@/$SHA256/g" < ci/PKGBUILD.template > PKGBUILD
sed -e "s/@TAG@/$TAG_NAME/g" -e "s/@SHA256@/$SHA256/g" < ci/wezterm-linuxbrew.rb.template > wezterm-linuxbrew.rb

View File

@ -365,6 +365,30 @@ cargo build --all --release""",
},
),
]
elif self.app_image:
steps += [
ActionStep(
"Checkout linuxbrew tap",
action="actions/checkout@v2",
params={
"repository": "wez/homebrew-wezterm-linuxbrew",
"path": "linuxbrew-wezterm",
"token": "${{ secrets.GH_PAT }}",
},
),
RunStep(
"Update linuxbrew tap formula",
"cp wezterm-linuxbrew.rb linuxbrew-wezterm/Formula/wezterm.rb",
),
ActionStep(
"Commit linuxbrew tap changes",
action="stefanzweifel/git-auto-commit-action@v4",
params={
"commit_message": "Automated update to match latest tag",
"repository": "linuxbrew-wezterm",
},
),
]
return steps

View File

@ -8,6 +8,7 @@ class Wezterm < Formula
homepage "https://wezfurlong.org/wezterm/"
url "https://github.com/wez/wezterm/releases/download/@TAG@/WezTerm-macos-@TAG@.zip"
sha256 "@SHA256@"
head "https://github.com/wez/wezterm/releases/download/nightly/WezTerm-macos-nightly.zip"
def install
prefix.install "WezTerm.app"

View File

@ -0,0 +1,17 @@
# Note: if you are viewing this from the tap repo, this file is automatically
# updated from:
# https://github.com/wez/wezterm/blob/master/ci/wezterm-linuxbrew.rb.template
# by automation in the wezterm repo.
class Wezterm < Formula
desc "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"
homepage "https://wezfurlong.org/wezterm/"
url "https://github.com/wez/wezterm/releases/download/@TAG@/WezTerm-@TAG@-Ubuntu16.04.AppImage"
sha256 "@SHA256@"
head "https://github.com/wez/wezterm/releases/download/nightly/WezTerm-nightly-Ubuntu16.04.AppImage"
def install
Dir.glob("*.AppImage").each do |img|
bin.install img => "wezterm"
end
end
end