Something went wrong. Try again.
⭐️ A friendly language for building type-safe, scalable systems!
Something went wrong. Try again.
961 B · 41 lines
Shell
at main
123456789101112131415161718192021222324252627282930313233343536373839404142# SPDX-License-Identifier: Apache-2.0# SPDX-FileCopyrightText: 2024 The Gleam contributors
#!/bin/sh
set -eu
GLEAM_COMMAND=${GLEAM_COMMAND:-"cargo run --quiet --"}
g() { echo "Running: $GLEAM_COMMAND $@" $GLEAM_COMMAND "$@"}
echo Resetting the build directory to get to a known staterm -fr build
echo This should succeed regardless of target as it is a dependency moduleg run --module=hello_joeg run --module=hello_joe --target=erlangg run --module=hello_joe --target=javascript
echo Building and running for JavaScript should succeedg build --target=javascriptg run --target=javascript
echo Building for Erlang should fail, even if previously a Erlang dependency was builtif g build --target=erlang; then echo "Expected build to fail" exit 1fi
echo Running for Erlang should fail, even if previously a Erlang dependency was builtif g run --target=erlang; then echo "Expected run to fail" exit 1fi
echoecho Success! 💖echo