This commit is contained in:
Jacob Heider 2022-09-23 09:44:25 -04:00 committed by Max Howell
parent cd7f9db7e0
commit 4ec52e6c6a
3 changed files with 48 additions and 12 deletions

View file

@ -93,13 +93,14 @@ jobs:
id: sorted
- run: |
cd ../cli
./scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
../cli/scripts/install.ts ${{ steps.sorted.outputs.pre-install }}
- run: scripts/build.ts ${{ steps.sorted.outputs.pkgs }}
id: build
env:
GITHUB_TOKEN: ${{ github.token }}
# TODO: GITHUB_TOKEN doesn't have private access to teaxyz/cli. This can be restored once that repo is public.
# GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
FORCE_UNSAFE_CONFIGURE: 1 # some configure scripts refuse to run as root
- name: test
@ -183,14 +184,10 @@ jobs:
name: ${{ matrix.os }}
path: ${{ steps.tea.outputs.prefix }}
- run: find ${{ steps.tea.outputs.prefix }}/tea.xyz/var/www
- run: scripts/deps.ts -i ${{ needs.build.outputs.pkgs }}
id: deps
- run: |
cd ../cli
./scripts/install.ts ${{ steps.deps.outputs.pkgs }}
- run: ../cli/scripts/install.ts ${{ steps.deps.outputs.pkgs }}
- run:
echo ${{ inputs.projects }} | xargs -tn1

View file

@ -0,0 +1,37 @@
distributable:
url: https://github.com/teaxyz/cli/archive/refs/tags/v{{ version }}.tar.gz
strip-components: 1
relocatable: true
versions:
github: teaxyz/cli
provides:
- bin/tea
dependencies:
# 1.25.0 - 1.25.2 panics on Linux for us
deno.land: '>=1.23 <1.25 || ^1.25.3'
build:
script: |
#FIXME: gotta be a better way
sed -i.bak "s/^const version = .*$/const version = \"{{ version }}\"/" src/app.ts
rm src/app.ts.bak
mkdir -p {{ prefix }}/bin
deno compile \
--allow-read \
--allow-write \
--allow-net \
--allow-run \
--allow-env \
--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

@ -14,10 +14,12 @@ if (import.meta.main) {
/// fix rpaths or install names for executables and dynamic libraries
export default async function fix_rpaths(installation: Installation, pkgs: PackageRequirement[]) {
if (installation.pkg.project == "go.dev") {
console.info("skipping rpath fixes for go.dev")
// skipping because for some reason patchelf breaks the go binary
// resulting in the only output being: `Segmentation Fault`
const skip_rpaths = [
"go.dev", // skipping because for some reason patchelf breaks the go binary resulting in the only output being: `Segmentation Fault`
"tea.xyz", // this causes tea to pass -E/--version (and everything else?) directly to deno, making it _too_ much of a wrapper.
]
if (skip_rpaths.includes(installation.pkg.project)) {
console.info(`skipping rpath fixes for ${installation.pkg.project}`)
return
}
console.info("doing SLOW rpath fixes…")