Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,20 @@ jobs:
repositories: homebrew-tap

- name: Dispatch homebrew-tap formula update
id: dispatch-homebrew
if: vars.ENABLE_HOMEBREW_DISPATCH == 'true'
continue-on-error: true
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
RELEASE_VERSION: ${{ github.ref_name }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/AniTrend/homebrew-tap/dispatches \
-f event_type='stackctl-release' \
-f client_payload="{\"version\":\"${{ github.ref_name }}\"}"
--input - <<EOF
{
"event_type": "stackctl-release",
"client_payload": {
"version": "$RELEASE_VERSION"
}
}
EOF
3 changes: 2 additions & 1 deletion src/cli/mod_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { assertEquals } from "@std/assert";
import { buildCli } from "../cli/mod.ts";
import { VERSION } from "../version.ts";

Deno.test("buildCli returns stackctl command", () => {
const cmd = buildCli();
Expand Down Expand Up @@ -45,5 +46,5 @@ Deno.test("buildCli produces correct help output smoke test", () => {

Deno.test("buildCli version is set", () => {
const cmd = buildCli();
assertEquals(cmd.getVersion(), "0.1.0-dev");
assertEquals(cmd.getVersion(), VERSION);
});
6 changes: 3 additions & 3 deletions src/version_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals } from "@std/assert";
import { assertMatch } from "@std/assert";
import { VERSION } from "./version.ts";

Deno.test("VERSION is dev", () => {
assertEquals(VERSION, "0.1.0-dev");
Deno.test("VERSION is set and follows semver pattern", () => {
assertMatch(VERSION, /^\d+\.\d+\.\d+(-dev)?$/);
});
Loading