Skip to content

Commit 93b96e2

Browse files
committed
fix
1 parent fa4e6ef commit 93b96e2

2 files changed

Lines changed: 70 additions & 6 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,26 @@ jobs:
4646
run: go mod tidy
4747

4848
- name: Build
49+
shell: bash
4950
run: |
51+
set -euo pipefail
5052
mkdir -p dist
51-
EXT=""
52-
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
53+
EXT=$(GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go env GOEXE)
5354
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o dist/${{ env.BINARY_NAME }}-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} ./cmd/ice
5455
5556
- name: Compress (tar/zip)
57+
shell: bash
5658
run: |
59+
set -euo pipefail
5760
cd dist
5861
for f in *; do
59-
case "$f" in
60-
*.exe) 7z a ${f%.exe}.zip $f >/dev/null ;;
61-
*) tar -czf $f.tar.gz $f ;;
62-
esac
62+
if [[ -f "$f" ]]; then
63+
if [[ "$f" == *.exe ]]; then
64+
zip -q "${f%.exe}.zip" "$f"
65+
else
66+
tar -czf "$f.tar.gz" "$f"
67+
fi
68+
fi
6369
done
6470
6571
- name: Upload artifacts

packaging/aur/PKGBUILD

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
pkgname=ice-bin
2+
pkgver=0.0.0
3+
pkgrel=1
4+
pkgdesc="Ice CLI streaming player (prebuilt binary from latest GitHub release)"
5+
arch=('x86_64' 'aarch64')
6+
url="https://github.com/Wraient/ice"
7+
license=('MIT')
8+
depends=('mpv')
9+
optdepends=('rofi: graphical selection via rofi')
10+
provides=('ice')
11+
conflicts=('ice')
12+
13+
_src_linux_amd64="ice-linux-amd64.tar.gz"
14+
_src_linux_arm64="ice-linux-arm64.tar.gz"
15+
16+
source_x86_64=("${_src_linux_amd64}::https://github.com/Wraient/ice/releases/latest/download/ice-linux-amd64.tar.gz" \
17+
"LICENSE::https://raw.githubusercontent.com/Wraient/ice/main/LICENSE")
18+
source_aarch64=("${_src_linux_arm64}::https://github.com/Wraient/ice/releases/latest/download/ice-linux-arm64.tar.gz" \
19+
"LICENSE::https://raw.githubusercontent.com/Wraient/ice/main/LICENSE")
20+
21+
sha256sums_x86_64=('SKIP' 'SKIP')
22+
sha256sums_aarch64=('SKIP' 'SKIP')
23+
24+
pkgver() {
25+
# Attempt to derive version from latest tag via headers (optional).
26+
# This runs in makepkg environment with network disabled by default unless --holdver.
27+
# Fallback keeps placeholder.
28+
command -v curl >/dev/null 2>&1 || { echo "$pkgver"; return; }
29+
latest=$(curl -Is https://github.com/Wraient/ice/releases/latest | sed -n 's/^location: .*\/tag\/v\?\([^[:space:]]*\).*/\1/p' | tr -d '\r')
30+
if [[ -n $latest ]]; then
31+
echo "$latest"
32+
else
33+
echo "$pkgver"
34+
fi
35+
}
36+
37+
build() {
38+
: # no build (precompiled binary)
39+
}
40+
41+
package() {
42+
cd "$srcdir"
43+
case "$CARCH" in
44+
x86_64)
45+
tar -xzf "${_src_linux_amd64}"
46+
install -Dm755 "ice-linux-amd64" "$pkgdir/usr/bin/ice"
47+
;;
48+
aarch64)
49+
tar -xzf "${_src_linux_arm64}"
50+
install -Dm755 "ice-linux-arm64" "$pkgdir/usr/bin/ice"
51+
;;
52+
esac
53+
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
54+
# Example shell completion placeholder (user can extend later)
55+
install -d "$pkgdir/usr/share/bash-completions" >/dev/null 2>&1 || true
56+
}
57+
58+
# vim:set ts=2 sw=2 et:

0 commit comments

Comments
 (0)