Skip to content

Commit

Permalink
manage.sh, adds 'test' command
Browse files Browse the repository at this point in the history
  • Loading branch information
torkus committed Jul 15, 2023
1 parent 958403d commit c2db367
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func reset(token string) {
"tukui-dummy": "b0492cc",
"elvui-dummy": "dc06d5f",
}[addon.Slug]
rc, so, se := run_cmd(fmt.Sprintf("reset-dummy-repo.sh %s %s", addon.Slug, revision), script_path)
rc, so, se := run_cmd(fmt.Sprintf("./reset-dummy-repo.sh %s %s", addon.Slug, revision), script_path)
ensure(rc == 0, "failed to reset dummy repo: "+so+se)
}
}
Expand Down
11 changes: 10 additions & 1 deletion manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if test ! "$cmd"; then
echo "available commands:"
echo " build build project"
echo " release build project for distribution"
echo " test run project tests"
echo " update-deps update project dependencies"
exit 1
fi
Expand Down Expand Up @@ -37,7 +38,7 @@ elif test "$cmd" = "release"; then
-v \
-o linux-amd64
sha256sum linux-amd64 > linux-amd64.sha256
echo ---
echo "---"
echo "wrote linux-amd64"
echo "wrote linux-amd64.sha256"
exit 0
Expand All @@ -49,6 +50,14 @@ elif test "$cmd" = "update-deps"; then
./manage.sh build
exit 0

elif test "$cmd" = "test"; then
if [ -z "$GITHUB_TOKEN" ]; then
echo "failed. command 'test' requires GITHUB_TOKEN to be set."
exit 1
fi
go test
exit 0

# ...

fi
Expand Down

0 comments on commit c2db367

Please sign in to comment.