- modules/sunrise/new.sh: curl | bash installer wrapped in main(), checks Go 1.27+/git/Docker, clones or fast-forwards the framework at the newest release tag (SUMMERCMS_REPO/DIR/REF overrides), installs summer and runs summer new next to the checkout, prints the cd line and a PATH hint - sunrise.Script() returns a fresh copy of the embedded script - smoke, shape, truncation and gated end-to-end tests; README and modules row
24 lines
783 B
Go
24 lines
783 B
Go
// Package sunrise embeds the SummerCMS bootstrap script, new.sh, so the
|
|
// script is versioned with the framework release that ships it.
|
|
//
|
|
// The script is what `curl -fsSL https://summercms.io/new | bash -s -- <name>`
|
|
// runs: it checks for Go 1.27 or newer, git and Docker, clones the framework
|
|
// at its newest release tag (or moves an existing release checkout forward),
|
|
// installs the summer CLI and runs `summer new <name>` next to the checkout.
|
|
// A web server hands out Script() as text/plain.
|
|
package sunrise
|
|
|
|
import (
|
|
"bytes"
|
|
_ "embed"
|
|
)
|
|
|
|
//go:embed new.sh
|
|
var script []byte
|
|
|
|
// Script returns the bootstrap script. Each call returns a fresh copy, so a
|
|
// caller may modify the slice without affecting later calls.
|
|
func Script() []byte {
|
|
return bytes.Clone(script)
|
|
}
|