-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·27 lines (21 loc) · 894 Bytes
/
release.sh
File metadata and controls
executable file
·27 lines (21 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
set -euo pipefail
VERSION="0.1.0" # Change this when you cut a new release
DIST_DIR="dist"
echo "🚀 Building DevLink CLI v$VERSION for Homebrew..."
# Clean and recreate dist directory
rm -rf "$DIST_DIR"
mkdir -p "$DIST_DIR"
# Build for macOS Intel (amd64)
echo "🔨 Building for macOS amd64..."
GOOS=darwin GOARCH=amd64 go build -o "$DIST_DIR/devlink" ./cmd/devlink
tar -czf "$DIST_DIR/devlink_${VERSION}_darwin_amd64.tar.gz" -C "$DIST_DIR" devlink
# Build for macOS ARM (arm64)
echo "🔨 Building for macOS arm64..."
GOOS=darwin GOARCH=arm64 go build -o "$DIST_DIR/devlink" ./cmd/devlink
tar -czf "$DIST_DIR/devlink_${VERSION}_darwin_arm64.tar.gz" -C "$DIST_DIR" devlink
# Compute SHA256 checksums
echo "🔑 Computing SHA256 checksums..."
shasum -a 256 "$DIST_DIR"/*.tar.gz
echo
echo "✅ Done! Upload the two tar.gz files in $DIST_DIR to your GitHub Release."