Skip to content

Commit

Permalink
fix(setup): Follow the gum v0.14.0
Browse files Browse the repository at this point in the history
Since GoReleaser has been updated and tar structure has been changed.
  • Loading branch information
5ouma committed May 6, 2024
1 parent 12e5a70 commit ed9298c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deps-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
id: find-replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "github.com/charmbracelet/gum/releases/download/v[0-9]+.[0-9]+.[0-9]+/gum_[0-9]+.[0-9]+.[0-9]+"
replace: "github.com/charmbracelet/gum/releases/download/v${{ steps.gum.outputs.version }}/gum_${{ steps.gum.outputs.version }}"
find: "gumVir='[0-9]+.[0-9]+.[0-9]+'"
replace: "gumVir='${{ steps.gum.outputs.version }}'"
include: "setup"

- name: 🎈 Create Pull Request
Expand Down
8 changes: 5 additions & 3 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ declare goThrough=false

# Actions
getGum() {
declare -r gumUrl="https://github.com/charmbracelet/gum/releases/download/v0.14.0/gum_0.14.0_$(uname)_$(uname -m).tar.gz"
declare -r gumVir='0.14.0'
declare -r gumDir="gum_${gumVir}_$(uname)_$(uname -m)"
declare -r gumUrl="https://github.com/charmbracelet/gum/releases/download/v$gumVir/$gumDir.tar.gz"
declare -r gumThemeUrl="https://raw.githubusercontent.com/5ouma/dotfiles/$GIT_REF/data/blue.json"

if (! type gum &>/dev/null); then
printf ' 🚚💨 Now delivering...'
curl -sL "$gumUrl" | tar zxC "$TMPDIR" 'gum' && alias gumCom='$TMPDIR/gum'
curl -sL "$gumUrl" | tar --strip-components=1 -xC "$TMPDIR" "$gumDir/gum" && alias gumCom="$TMPDIR/gum"
printf '\r '
else
alias gumCom="$(which gum)"
Expand Down Expand Up @@ -306,7 +308,7 @@ restoreAppSettings() {
} && run 'restoreAppSettings' '## 💾 Restore application settings' true

restoreAppShortcuts() {
[[ ! "$(defaults read com.apple.universalaccess com.apple.custommenu.apps)" =~ "NSGlobalDomain" && $? ]] && skip
(defaults read com.apple.universalaccess com.apple.custommenu.apps &>/dev/null) && skip
# shellcheck disable=SC2016
gum run 'Running `mksei load`...' -- mksei load "$data/keyboard_shortcuts.json"
} && run 'restoreAppShortcuts' '## ⌨️ Restore App Shortcuts' true
Expand Down

0 comments on commit ed9298c

Please sign in to comment.