[READ-ONLY] Mirror of https://github.com/andrioid/gastro. Server Side templates, combining Go (frontmatter) and html/template (body) with full LSP support gastro.andri.dk
golang lsp-server template-engine
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839#!/usr/bin/env bash#MISE description="Verify that scaffolded projects build successfully"set -euo pipefailTEMP_DIR=$(mktemp -d)trap "rm -rf $TEMP_DIR" EXITGASTRO_REPO="$(cd "$(dirname "$0")/.." && pwd)"echo "Building gastro binary..."(cd "$GASTRO_REPO" && go build -o "$TEMP_DIR/gastro" -ldflags "-X main.version=0.1.0" ./cmd/gastro/)echo "Scaffolding new project...""$TEMP_DIR/gastro" new "$TEMP_DIR/testproject"# Point the scaffolded project at the local working tree so the test# exercises the in-progress code rather than whatever is on the module# proxy. Without this, scaffolds that depend on unreleased runtime APIs# (e.g. AttachDeps, From[T]) fail until a release goes out.echo "Adding local replace directive..."(cd "$TEMP_DIR/testproject" && go mod edit -replace="github.com/andrioid/gastro=$GASTRO_REPO")echo "Running go mod tidy..."(cd "$TEMP_DIR/testproject" && go mod tidy)echo "Verifying 'go tool gastro' resolves via the tool directive..."(cd "$TEMP_DIR/testproject" && go tool gastro list >/dev/null)echo "Verifying 'go generate ./...' runs the //go:generate directive..."(cd "$TEMP_DIR/testproject" && go generate ./... >/dev/null)echo "Building scaffolded project..."(cd "$TEMP_DIR/testproject" && go build -o /dev/null .)echo ""echo "Bootstrap verification passed."