mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
Don’t set TEA_PREFIX (#522)
* Don’t set TEA_PREFIX Fixes https://github.com/teaxyz/cli/issues/427 We build to TEA_PREFIX by default in pantry dev-envs now. You can still override this if you want. `TEA_PANTRY_PATH=foo tea bar` will now use * wip
This commit is contained in:
parent
3248e8fa30
commit
9a351d6e8e
6 changed files with 22 additions and 20 deletions
4
.github/actions/setup-brewkit/action.yml
vendored
4
.github/actions/setup-brewkit/action.yml
vendored
|
@ -24,7 +24,7 @@ runs:
|
||||||
id: tea
|
id: tea
|
||||||
with:
|
with:
|
||||||
prefix: ${{ inputs.prefix }}
|
prefix: ${{ inputs.prefix }}
|
||||||
+: tea.xyz/brewkit~0.5
|
+: tea.xyz/brewkit~0.7
|
||||||
# prevent pantry from reassigning TEA_PREFIX etc.
|
# prevent pantry from reassigning TEA_PREFIX etc.
|
||||||
srcroot: null
|
srcroot: null
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ runs:
|
||||||
cache-name: setup
|
cache-name: setup
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
if test -d "{{ github.workspace }}"/projects; then
|
if test -d "${{ github.workspace }}"/projects; then
|
||||||
echo "TEA_PANTRY_PATH=${{ github.workspace }}" >> $GITHUB_ENV
|
echo "TEA_PANTRY_PATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -50,7 +50,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
FORCE_UNSAFE_CONFIGURE: 1 # some configure scripts refuse to run as root
|
FORCE_UNSAFE_CONFIGURE: 1 # some configure scripts refuse to run as root
|
||||||
TEA_PANTRY_PATH: ${{ github.workspace }}
|
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
ABS_PATHS=$(echo $PATHS | tr ' ' '\n' | sed -e "s_^_$TEA_PREFIX/_" | tr '\n' ' ')
|
ABS_PATHS=$(echo $PATHS | tr ' ' '\n' | sed -e "s_^_$TEA_PREFIX/_" | tr '\n' ' ')
|
||||||
|
@ -132,7 +131,6 @@ jobs:
|
||||||
- run: pkg test ${{ inputs.projects }}
|
- run: pkg test ${{ inputs.projects }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
TEA_PANTRY_PATH: ${{ github.workspace }}
|
|
||||||
|
|
||||||
- name: '[post]'
|
- name: '[post]'
|
||||||
run:
|
run:
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -32,6 +32,6 @@ jobs:
|
||||||
needs: [get-diff]
|
needs: [get-diff]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
projects: ${{ needs.get-diff.outputs.diff || 'zlib.net' }}
|
projects: ${{ needs.get-diff.outputs.diff || 'zlib.net^1.2' }}
|
||||||
platform: ${{ matrix.platform }}
|
platform: ${{ matrix.platform }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
||||||
/tea.out
|
/srcs
|
||||||
/tea.linux
|
/builds
|
||||||
|
/testbeds
|
||||||
|
|
||||||
#TODO commit after v1
|
#TODO commit after v1
|
||||||
/deno.lock
|
/deno.lock
|
||||||
|
|
24
README.md
24
README.md
|
@ -24,21 +24,24 @@ Assuming you have tea+magic installed:
|
||||||
$ git clone https://github.com/teaxyz/pantry.core
|
$ git clone https://github.com/teaxyz/pantry.core
|
||||||
|
|
||||||
$ cd pantry.core
|
$ cd pantry.core
|
||||||
# all the following commands operate in `./tea.out`
|
|
||||||
# your tea installation remains untouched
|
|
||||||
|
|
||||||
$ pkg init
|
$ pkg init
|
||||||
# ^^ creates a “wip” package.yml
|
# ^^ creates a “wip” package.yml
|
||||||
|
|
||||||
$ pkg edit
|
$ pkg edit
|
||||||
# ^^ opens the new package.yml in your EDITOR
|
# ^^ opens the new package.yml in your `$EDITOR`
|
||||||
|
|
||||||
$ pkg build
|
$ pkg build
|
||||||
# ^^ will probably require a (zero permissions) GitHub [PAT].
|
# ^^ runs the build script from your package.yml
|
||||||
# Using `gh auth login` is the easiest way to set this up.
|
# refer to other packages for examples
|
||||||
|
# ^^ usually requires a (zero permissions) GitHub [PAT]
|
||||||
|
# either set `$GITHUB_TOKEN` or run `gh auth login` (once) first
|
||||||
|
# builds in `./srcs`, installs to `~/.tea`
|
||||||
|
|
||||||
$ pkg test
|
$ pkg test
|
||||||
# ^^ you need to write a test that verifies the package works
|
# ^^ runs the test script from your package.yml
|
||||||
|
# refer to other packages for examples
|
||||||
|
# ^^ operates in `./tests`
|
||||||
|
|
||||||
$ gh repo fork
|
$ gh repo fork
|
||||||
$ git branch -m my-new-package
|
$ git branch -m my-new-package
|
||||||
|
@ -46,10 +49,11 @@ $ git push origin my-new-package
|
||||||
$ gh pr create
|
$ gh pr create
|
||||||
```
|
```
|
||||||
|
|
||||||
> `pkg` can be run without magic via `tea -E pkg` (this dev-env provides `+tea.xyz/brewkit`).
|
> * `pkg` can be run without magic via `tea -E pkg` (this dev-env provides `+tea.xyz/brewkit`).
|
||||||
> `gh` can be run without magic via `tea gh`.
|
> * `gh` can be run without magic via `tea gh`.
|
||||||
> `git` can be run without magic via `tea git`.
|
> * `git` can be run without magic via `tea git`.
|
||||||
|
> * `pkg build` and `pkg test` take a `-L` flag to run in a Linux Docker container
|
||||||
|
> * All commands take an optional pkg-spec eg. `pkg build zlib.net^1.1`
|
||||||
|
|
||||||
## Packaging Guide
|
## Packaging Guide
|
||||||
|
|
||||||
|
|
5
tea.yaml
5
tea.yaml
|
@ -1,5 +1,4 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
tea.xyz/brewkit: ~0.5
|
tea.xyz/brewkit: ~0.7
|
||||||
env:
|
env:
|
||||||
TEA_PANTRY_PATH: ${{srcroot}}:{{home}}/.tea/tea.xyz/var/pantry
|
TEA_PANTRY_PATH: ${{srcroot}}
|
||||||
TEA_PREFIX: ${{srcroot}}/tea.out
|
|
||||||
|
|
Loading…
Reference in a new issue