Use version stamped tea srcs; tidy (#115)

This commit is contained in:
Max Howell 2023-01-24 08:57:24 -05:00 committed by GitHub
parent fd4fcf7fb7
commit 1b365dd48c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 27 deletions

View file

@ -1,6 +1,9 @@
distributable: distributable:
url: https://github.com/teaxyz/cli/archive/refs/tags/v{{ version }}.tar.gz url: https://github.com/teaxyz/cli/releases/download/v{{ version }}/tea-{{ version }}.tar.xz
strip-components: 1 strip-components: 2
#FIXME I have no idea why we must strip TWO components
# when I manually extract the tarball it only has one but if we specify 1
# both here and manually it has that same component *still*
versions: versions:
github: teaxyz/cli github: teaxyz/cli
@ -8,30 +11,14 @@ versions:
provides: provides:
- bin/tea - bin/tea
dependencies:
# 1.25.0 - 1.25.2 panics on Linux for us
deno.land: '>=1.23 <1.25 || ^1.25.3'
build: build:
script: | dependencies:
sed -i.bak "s/^const version = .*$/const version = \"{{ version }}\"/" src/app.ts deno.land: '>=1.23 <1.25 || ^1.25.3'
rm src/app.ts.bak # ^^ 1.25.0 - 1.25.2 panics on Linux for us
working-directory: ${{prefix}}/bin
script:
deno task --config "$SRCROOT"/deno.jsonc compile
mkdir -p {{ prefix }}/bin test: |
tea --version
deno compile \ test "$(tea --version)" = "tea {{ version }}"
--allow-read \
--allow-write \
--allow-net \
--allow-run \
--allow-env \
--unstable \
--import-map=./import-map.json \
--output {{ prefix }}/bin/tea \
./src/app.ts
test:
#TODO: build teaxyz/white-paper for better test
script: |
tea --version
test "$(tea --version)" = "tea {{ version }}"

View file

@ -58,6 +58,7 @@ async function __build(pkg: Package): Promise<BuildResult> {
} }
async function should_clean() { async function should_clean() {
if (pkg.project == 'tea.xyz') return
// only required as we aren't passing everything into hydrate // only required as we aren't passing everything into hydrate
const depends_on_self = () => deps.build.some(x => x.project === pkg.project) const depends_on_self = () => deps.build.some(x => x.project === pkg.project)
const wet_dep = () => wet.pkgs.some(x => x.project === pkg.project) const wet_dep = () => wet.pkgs.some(x => x.project === pkg.project)