aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--git_hooks_client/Makefile3
-rw-r--r--resources.go4
3 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 7232182..a35195c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,13 @@
.PHONY: clean version.go
-forge: $(filter-out forge,$(wildcard *)) version.go
+CFLAGS = -Wall -Wextra -Werror -pedantic -std=c99 -D_GNU_SOURCE
+
+forge: $(filter-out forge,$(wildcard *)) version.go git_hooks_client/*.c git_hooks_client/git_hooks_client
go mod vendor
go build -o $@
+git_hooks_client/git_hooks_client:
+
version.go:
printf 'package main\nconst VERSION="%s"\n' $(shell git describe --tags --long --always --dirty) > $@
diff --git a/git_hooks_client/Makefile b/git_hooks_client/Makefile
deleted file mode 100644
index f8f2c50..0000000
--- a/git_hooks_client/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-CFLAGS = -Wall -Wextra -Werror -pedantic -std=c99 -D_GNU_SOURCE
-
-git_hooks_client:
diff --git a/resources.go b/resources.go
index 7d24cb3..4367f8e 100644
--- a/resources.go
+++ b/resources.go
@@ -14,7 +14,7 @@ import (
//go:embed Makefile
//go:embed schema.sql
//go:embed static/* templates/*
-//go:embed git_hooks_client/*
+//go:embed git_hooks_client/*.c
//go:embed vendor/*
var source_fs embed.FS
@@ -27,7 +27,7 @@ func init() {
)
}
-//go:embed templates/* static/*
+//go:embed templates/* static/* git_hooks_client/git_hooks_client
var resources_fs embed.FS
var templates *template.Template