Merge pull request #15 from Lunarmagpie/Gleam

feat: fix erlang package and limit gleam stdout
This commit is contained in:
Endercheif 2023-03-13 20:49:35 -07:00 committed by GitHub
commit 15c8782647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View File

@ -95,6 +95,7 @@ jobs:
docker build -t piston-api api
docker run --network container:repo -v $(pwd)'/data:/piston' -e PISTON_LOG_LEVEL=DEBUG -e 'PISTON_REPO_URL=http://localhost:8000/index' -d --name api piston-api
echo Waiting for API to start..
docker pull appropriate/curl
docker run --network container:api appropriate/curl -s --retry 10 --retry-connrefused http://localhost:2000/api/v2/runtimes
echo Waiting for Index to start..

View File

@ -6,7 +6,7 @@ mkdir -p build
cd build
curl "http://erlang.org/download/otp_src_23.0.tar.gz" -o erlang.tar.gz
curl "https://github.com/erlang/otp/releases/download/OTP-23.0/otp_src_23.0.tar.gz" -o erlang.tar.gz -L
tar xzf erlang.tar.gz --strip-components=1
rm erlang.tar.gz

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
gleam new project --skip-git
gleam new project --skip-git > /dev/null
mkdir project/build
cp /piston/packages/gleam/0.27.0/project/manifest.toml project/manifest.toml
cp /piston/packages/gleam/0.27.0/project/build/packages* project/build -r 2> /dev/null
@ -12,4 +12,5 @@ shift
echo "$@" > compile_args
cd project
gleam build "$@"
# Awk is used to remove lines from the output that don't help for the piston output.
gleam build "$@" | awk "NR>=4"

View File

@ -2,4 +2,5 @@
shift
cd project
gleam run $(cat ../compile_args 2> /dev/null) -- "$@"
# Awk is used to remove lines from the output that don't help for the piston output.
gleam run $(cat ../compile_args 2> /dev/null) -- "$@" | awk "NR>=4"