Fork of daniellemaywood.uk/gleam — Wasm codegen work
606 B
29 lines
1# SPDX-License-Identifier: Apache-2.0
2# SPDX-FileCopyrightText: 2024 The Gleam contributors
3
4#!/bin/sh
5
6# https://github.com/gleam-lang/gleam/pull/4445
7
8set -eu
9
10GLEAM_COMMAND=${GLEAM_COMMAND:-"cargo run --quiet --"}
11
12g() {
13 echo "Running: $GLEAM_COMMAND $@"
14 $GLEAM_COMMAND "$@"
15}
16
17echo Resetting the build directory to get to a known state
18rm -fr build
19
20echo Running publish should not print the warning
21output=$(yes "n" | g publish)
22if echo "$output" | grep -q "Your package defines multiple top-level modules"; then
23 echo "Expected warning to be printed"
24 exit 1
25fi
26
27echo
28echo Success! 💖
29echo