]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - src/Makefile
buildsys: improve resolving package meta info
[proxmox-widget-toolkit.git] / src / Makefile
index 66167fee4995486742481e886dc26ca1c9bf5d4b..c0c99c071483b76b64432a248fba65493def0ea2 100644 (file)
@@ -120,9 +120,11 @@ lint: $(JSSRC)
        eslint --strict $(JSSRC)
        touch ".lint-incremental"
 
+BUILD_TIME=$(or $(SOURCE_DATE_EPOCH),$(shell date '+%s.%N'))
+BUILD_VERSION=$(or $(DEB_VERSION),$(shell git rev-parse HEAD),unknown version)
 proxmoxlib.js: .lint-incremental $(JSSRC)
        # add the version as comment in the file
-       echo "// $(DEB_VERSION_UPSTREAM_REVISION)" > $@.tmp
+       echo "// v$(BUILD_VERSION) - t$(BUILD_TIME)" > $@.tmp
        cat $(JSSRC) $(MARKEDJS)  >> $@.tmp
        mv $@.tmp $@