File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 run : |
3939 go build ./...
4040 go test -v ./...
41+
42+ - name : Verify --version flag
43+ run : |
44+ go build -o tsidp-server .
45+ VERSION=$(./tsidp-server --version)
46+ echo "Version: $VERSION"
47+ [ -n "$VERSION" ] || (echo "ERROR: --version produced empty output"; exit 1)
48+
49+ - name : Verify --version flag
50+ run : |
51+ go build -o tsidp-server .
52+ VERSION=$(./tsidp-server --version)
53+ echo "Version: $VERSION"
54+ [ -n "$VERSION" ] || (echo "ERROR: --version produced empty output"; exit 1)
Original file line number Diff line number Diff line change 5050 version : ' ~> v2'
5151 args : ${{ steps.goreleaser-args.outputs.args }}
5252 env :
53- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+ -
55+ name : Verify --version flag
56+ run : |
57+ BINARY=$(find dist -path '*linux*amd64*' -name 'tsidp-server' -type f | head -1)
58+ [ -n "$BINARY" ] || (echo "ERROR: could not find linux/amd64 binary in dist/"; exit 1)
59+ VERSION=$("$BINARY" --version)
60+ echo "Version: $VERSION"
61+ [ -n "$VERSION" ] || (echo "ERROR: --version produced empty output"; exit 1)
62+ if [ "${GITHUB_EVENT_NAME}" != "pull_request" ]; then
63+ EXPECTED="${GITHUB_REF_NAME}"
64+ [ "$VERSION" = "$EXPECTED" ] || (echo "ERROR: expected $EXPECTED got $VERSION"; exit 1)
65+ fi
You can’t perform that action at this time.
0 commit comments