jordi fita mas cf527ce070 Add the application’s version to the footer
This is mostly because it is required for the “Digital Kit”, but it also
works in our favor because now i can version the URL to the static
resources.

Go 1.18 adds the info from git if the package is build from a git
repository, but this is not the case in OBS, so i instead relay on a
constant for the version number.  This constant is “updated” by Debian’s
rules, mostly due to the discussion in [0].

[0]: https://github.com/golang/go/issues/22706
2024-01-21 20:50:16 +01:00

15 lines
414 B
Makefile
Executable File

#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
%:
dh $@ --builddirectory=_build --buildsystem=golang --with=golang
execute_before_dh_auto_build:
printf 'package build\n\nconst Version = "%s"\n' "$(DEB_VERSION_UPSTREAM)" > pkg/build/version.go
cp pkg/build/version.go _build/src/dev.tandem.ws/tandem/camper/pkg/build/version.go
make
execute_after_dh_auto_test:
pg_virtualenv -v 15 make test-deploy