Skip to content

Commit

Permalink
Publish installer (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl authored Feb 7, 2024
1 parent aea5d31 commit 4c90658
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/cd.installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
pull_request:
paths:
- .github/workflows/cd.installer.yml
push:
branches: main
paths:
- installer.sh
- .github/workflows/cd.installer.yml

jobs:
cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- run: aws s3 cp ./installer.sh s3://${{ secrets.AWS_S3_BUCKET }}/installer.sh

- run: aws cloudfront create-invalidation
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
--paths / /installer.sh
File renamed without changes.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ $ mash ai chat --help # or https://mash.pkgx.sh/ai/chat/

## Installing `mash`

`mash` uses `pkgx` for packaging primitives so you may as well use `pkgx` to
run `mash`:
To install `mash` and `pkgx`:

```sh
curl https://mash.pkgx.sh | sh
# ^^ installs /usr/local/bin/mash and /usr/local/bin/pkgx
```

If you prefer, you can run `mash` via `pkgx`:

```sh
$ brew install pkgxdev/made/pkgx # or curl https://pkgx.sh | sh
$ pkgx mash

# or install it via pkgx:
Expand Down Expand Up @@ -211,12 +218,11 @@ $ bash ./stargazer
# ^^ they will need to read the script to determine deps and interpreter
```

Hackers can use your script without installing `pkgx` first via our cURL
one-liner. This executes the script but doesn’t install pkgx or any other
pkgs:
Hackers can use your script without installing `pkgx` or `mash` first via our
cURL one-liner. This executes the script but doesn’t install anything:

```sh
sh <(curl https://pkgx.sh) mash your-script-name
sh <(curl https://mash.pkgx.sh) <category> <scriptname>
```


Expand Down

0 comments on commit 4c90658

Please sign in to comment.