···501501502502 - name: Test publishing with default main
503503 run: ./test.sh
504504- working-directory: ./test/default_main
505505-506506- - name: Test publishing with default main and doc
507507- run: ./test.sh
508508- working-directory: ./test/default_main_with_doc
504504+ working-directory: ./test/publishing_default_main
···11-# This file was generated by Gleam
22-# You typically do not need to edit this file
33-44-packages = [
55- { name = "gleam_stdlib", version = "0.62.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "0080706D3A5A9A36C40C68481D1D231D243AF602E6D2A2BE67BA8F8F4DFF45EC" },
66-]
77-88-[requirements]
99-gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" }
-6
test/default_main_with_doc/src/default_main.gleam
···11-import gleam/io
22-33-/// This is the main function
44-pub fn main() -> Nil {
55- io.println("Hello from default_main!")
66-}
···11-#!/bin/sh
22-33-set -eu
44-55-GLEAM_COMMAND=${GLEAM_COMMAND:-"cargo run --quiet --"}
66-77-g() {
88- echo "Running: $GLEAM_COMMAND $@"
99- $GLEAM_COMMAND "$@"
1010-}
1111-1212-echo Resetting the build directory to get to a known state
1313-rm -fr build
1414-1515-echo Running publish should publish
1616-if ! yes "n" | g publish; then
1717- echo "Expected publish to succeed, but it failed"
1818- exit 1
1919-fi
2020-2121-echo
2222-echo Success! 💖
2323-echo