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