@@ -3,15 +3,69 @@ tags: [development, test]
33executables:
44 - verb: create
55 name: snapshot
6- description: Create a snapshot release
6+ description: Create a snapshot release locally (skips Docker builds by default)
77 aliases: [release, snap]
88 exec:
99 dir: //
10+ params:
11+ - envKey: SKIP_DOCKER
12+ text: "true"
1013 cmd: |
1114 if ! command -v goreleaser &> /dev/null; then
1215 echo "goreleaser is not installed. Please install it first."
1316 exit 1
1417 fi
15-
16- echo "creating snapshot release..."
17- goreleaser release --snapshot --clean
18+
19+ SKIP_FLAG=""
20+ if [ "$SKIP_DOCKER" = "true" ]; then
21+ echo "Creating snapshot release (skipping Docker builds)..."
22+ SKIP_FLAG="--skip=docker"
23+ else
24+ echo "Creating snapshot release (including Docker builds)..."
25+ fi
26+
27+ goreleaser release --snapshot --clean $SKIP_FLAG
28+
29+ echo ""
30+ echo "Snapshot build complete!"
31+ echo ""
32+ echo "Binaries built for:"
33+ ls -1 dist/ | grep -E "^flow_.*_(linux|darwin)_(amd64|arm64)" | sed 's/^/ - /'
34+
35+ if [ "$SKIP_DOCKER" = "false" ]; then
36+ echo ""
37+ echo "Docker images built:"
38+ echo " - ghcr.io/flowexec/flow:{{ .Tag }}"
39+ echo " - ghcr.io/flowexec/flow:latest"
40+ echo ""
41+ echo "Test Docker image locally:"
42+ echo " docker run --rm ghcr.io/flowexec/flow:latest --version"
43+ fi
44+
45+ echo ""
46+ echo "Test your platform's binary:"
47+ CURRENT_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
48+ CURRENT_ARCH=$(uname -m)
49+ if [ "$CURRENT_ARCH" = "x86_64" ]; then CURRENT_ARCH="amd64"; fi
50+ if [ "$CURRENT_ARCH" = "aarch64" ]; then CURRENT_ARCH="arm64"; fi
51+
52+ BINARY_DIR=$(ls -d dist/flow_${CURRENT_OS}_${CURRENT_ARCH}* 2>/dev/null | head -1)
53+ if [ -n "$BINARY_DIR" ]; then
54+ echo " ${BINARY_DIR}/flow --version"
55+ echo ""
56+ ${BINARY_DIR}/flow --version
57+ fi
58+
59+ - verb: check
60+ name: release
61+ description: Check goreleaser configuration without building
62+ exec:
63+ dir: //
64+ cmd: |
65+ if ! command -v goreleaser &> /dev/null; then
66+ echo "goreleaser is not installed. Please install it first."
67+ exit 1
68+ fi
69+
70+ echo "Checking goreleaser configuration..."
71+ goreleaser check
0 commit comments