Skip to content

Commit

Permalink
fix bug preventing dispatch of executable commands
Browse files Browse the repository at this point in the history
also, play with github actions
  • Loading branch information
unRob committed Nov 9, 2023
1 parent 7272177 commit 9d16e14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,9 @@ jobs:
- name: update homebrew formulas
# re-enable when we only wanna build for stable releases
# if: ${{ steps.build.outputs.prerelease == "false" }}
env:
GITHUB_TOKEN: ${{ secrets.FORMULAS_PAT }}
VERSION: ${{ steps.build.outputs.version }}
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/unRob/homebrew-formulas/actions/workflows/version-bump.yml/dispatches \
-d '{"ref":"main","inputs":{ "formula": "Formula/milpa.rb", "version": "'"$VERSION"'" }}'
uses: unRob/homebrew-formulas
secrets:
token: ${{ secrets.FORMULAS_PAT }}
with:
version: ${{ steps.build.outputs.version }}
formula: milpa
2 changes: 1 addition & 1 deletion .milpa/docs/milpa/command/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The environment available to a **script** is composed of four groups:
Your script has access to the following variables set by `milpa` after parsing arguments and running validations:

- `MILPA_COMMAND_NAME`: the space delimited name of your command, i.e. `db connect`;
- `MILPA_COMMAND_KIND`: either `source` for `.sh` scripts, or `exec` for executables;
- `MILPA_COMMAND_KIND`: either `source` for `.sh` scripts, or `executable` for executables;
- `MILPA_COMMAND_REPO`: the path to the repo containing this command, i.e. `/home/you/project/.milpa`; and
- `MILPA_COMMAND_PATH`: the full path to the executable being called.

Expand Down
2 changes: 1 addition & 1 deletion milpa
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fi

# Run the subcommand
case "$MILPA_COMMAND_KIND" in
exec)
executable)
exec "$MILPA_COMMAND_PATH" "$@" ;;
source)
# shellcheck disable=1090
Expand Down

0 comments on commit 9d16e14

Please sign in to comment.