3 Commits

Author SHA1 Message Date
b86a793e1c Merge pull request #45 from gogrlx/dependabot/go_modules/github.com/go-git/go-git/v5-5.17.1
chore(deps): bump github.com/go-git/go-git/v5 from 5.17.0 to 5.17.1
2026-04-01 02:31:21 -04:00
dependabot[bot]
adb8de7bee chore(deps): bump github.com/go-git/go-git/v5 from 5.17.0 to 5.17.1
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.17.0 to 5.17.1.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.17.0...v5.17.1)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.17.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 17:16:13 +00:00
4ea7c3f93b build(release): add Homebrew tap, install script, fix deprecations
- Replace deprecated brews with homebrew_casks
- Replace deprecated nfpms.builds with nfpms.ids
- Remove deprecated snapshot.name_template
- Create gogrlx/homebrew-tap repo for Homebrew distribution
- Add install.sh for curl-pipe-sh installation
- Users can now: brew install gogrlx/tap/snack
2026-03-25 19:08:06 +00:00
4 changed files with 70 additions and 7 deletions

View File

@@ -7,9 +7,6 @@ before:
hooks:
- go mod tidy
snapshot:
name_template: "{{ incpatch .Version }}-next"
builds:
- main: ./cmd/snack/
id: snack
@@ -44,7 +41,7 @@ archives:
nfpms:
- id: snack
package_name: snack
builds: [snack]
ids: [snack]
formats: [apk, deb, rpm]
bindir: /usr/bin
description: "A unified CLI for system package managers"
@@ -53,6 +50,19 @@ nfpms:
homepage: https://github.com/gogrlx/snack
vendor: Adatomic, Inc.
homebrew_casks:
- ids: [snack, snack-universal]
name: snack
binaries:
- snack
repository:
owner: gogrlx
name: homebrew-tap
directory: Casks
homepage: https://github.com/gogrlx/snack
description: "A unified CLI for system package managers"
license: 0BSD
release:
github:
owner: gogrlx

2
go.mod
View File

@@ -4,7 +4,7 @@ go 1.26.1
require (
github.com/charmbracelet/fang v1.0.0
github.com/go-git/go-git/v5 v5.17.0
github.com/go-git/go-git/v5 v5.17.1
github.com/spf13/cobra v1.10.2
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.40.0

4
go.sum
View File

@@ -87,8 +87,8 @@ github.com/go-git/go-billy/v5 v5.8.0 h1:I8hjc3LbBlXTtVuFNJuwYuMiHvQJDq1AT6u4DwDz
github.com/go-git/go-billy/v5 v5.8.0/go.mod h1:RpvI/rw4Vr5QA+Z60c6d6LXH0rYJo0uD5SqfmrrheCY=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
github.com/go-git/go-git/v5 v5.17.0 h1:AbyI4xf+7DsjINHMu35quAh4wJygKBKBuXVjV/pxesM=
github.com/go-git/go-git/v5 v5.17.0/go.mod h1:f82C4YiLx+Lhi8eHxltLeGC5uBTXSFa6PC5WW9o4SjI=
github.com/go-git/go-git/v5 v5.17.1 h1:WnljyxIzSj9BRRUlnmAU35ohDsjRK0EKmL0evDqi5Jk=
github.com/go-git/go-git/v5 v5.17.1/go.mod h1:pW/VmeqkanRFqR6AljLcs7EA7FbZaN5MQqO7oZADXpo=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=

53
install.sh Executable file
View File

@@ -0,0 +1,53 @@
#!/bin/sh
# Install snack - a unified CLI for system package managers
# Usage: curl -sSfL https://raw.githubusercontent.com/gogrlx/snack/main/install.sh | sh
set -e
REPO="gogrlx/snack"
INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"
# Detect OS and arch
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m)"
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64" ;;
armv*) ARCH="arm" ;;
esac
# macOS universal binary
if [ "$OS" = "darwin" ]; then
ARCH="universal"
fi
echo "Detected: ${OS}/${ARCH}"
# Get latest release tag
TAG="$(curl -sSf "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')"
VERSION="${TAG#v}"
if [ -z "$VERSION" ]; then
echo "Error: could not determine latest version" >&2
exit 1
fi
echo "Installing snack ${VERSION}..."
TARBALL="snack-${VERSION}-${OS}-${ARCH}.tar.gz"
URL="https://github.com/${REPO}/releases/download/${TAG}/${TARBALL}"
TMP="$(mktemp -d)"
trap 'rm -rf "$TMP"' EXIT
curl -sSfL "$URL" -o "${TMP}/${TARBALL}"
tar xzf "${TMP}/${TARBALL}" -C "$TMP"
if [ -w "$INSTALL_DIR" ]; then
mv "${TMP}/snack" "${INSTALL_DIR}/snack"
else
echo "Installing to ${INSTALL_DIR} (requires sudo)..."
sudo mv "${TMP}/snack" "${INSTALL_DIR}/snack"
fi
chmod +x "${INSTALL_DIR}/snack"
echo "snack ${VERSION} installed to ${INSTALL_DIR}/snack"