From 3223bb6cf48cace1028296738d548ccf23db05fe Mon Sep 17 00:00:00 2001

From: dtonon

Date: Mon, 1 Sep 2025 16:10:32 +0200

Subject: [PATCH] Update justfile to allow building on macOS

---

justfile | 12 +++++++++++-

1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/justfile b/justfile

index e9eac44..84fa121 100644

--- a/justfile

+++ b/justfile

@@ -4,7 +4,17 @@ dev:

fd 'go|html|md|templ|base.css' | entr -r bash -c 'just build && godotenv ./nostrapps.com'

build: templ tailwind

- CC=musl-gcc go build -ldflags="-s -w -linkmode external -extldflags '-static' -s -w" -o ./

+ #!/usr/bin/env bash

+ if [[ "{{os()}}" == "macos" ]]; then

+ echo "Building for macOS..."

+ CGO_ENABLED=1 go build -ldflags="-s -w" -o ./

+ elif [[ "{{os()}}" == "linux" ]]; then

+ echo "Building for Linux..."

+ CC=musl-gcc go build -ldflags="-s -w -linkmode external -extldflags '-static'" -o ./

+ else

+ echo "Unsupported OS: {{os()}}"

+ exit 1

+ fi

templ:

templ generate

--

libgit2 1.9.1

Reply to this note

Please Login to reply.

Discussion

Test reply