From a64e3ee179282fceb85d1c0e89afd03cac785a67 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 27 Feb 2025 17:18:39 -0500 Subject: [PATCH] misc: Add baddev tooling I think this is the *wrong* way to build this, but it's perfectly legal to have a feature branch with this committed that people can develop against. We can always cherry-pick off those commits to merge them, and we can update and rebase this commit over time when needed. --- Makefile | 4 ++++ misc/make-baddev.sh | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100755 misc/make-baddev.sh diff --git a/Makefile b/Makefile index e5172aa4..5180710f 100644 --- a/Makefile +++ b/Makefile @@ -213,6 +213,10 @@ build: $(PROGRAM) build-debug: LDFLAGS= build-debug: $(PROGRAM) +# if you're using the bad/dev branch, you might want this too! +baddev: BUILD_FLAGS = -tags 'noaugeas novirt' +baddev: $(PROGRAM) + # pattern rule target for (cross)building, mgmt-OS-ARCH will be expanded to the correct build # extract os and arch from target pattern GOOS=$(firstword $(subst -, ,$*)) diff --git a/misc/make-baddev.sh b/misc/make-baddev.sh new file mode 100755 index 00000000..9079da97 --- /dev/null +++ b/misc/make-baddev.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Make a new "baddev" branch, start on whatever branch you want to base it on. +git checkout -B baddev # scary -B reset the branch +make +git add lang/parser/lexer.nn.go --force +git add lang/parser/y.go --force +git add lang/interpolate/parse.generated.go --force +git add lang/core/generated_funcs.go --force +git commit -m 'lang: Commit generated code' +git push origin baddev --force +echo 'run `make baddev` to build a binary!'