From 04da2a9d39bd210ae8405b52094684384d422cae Mon Sep 17 00:00:00 2001 From: DanyLE Date: Thu, 14 Mar 2024 10:54:55 +0100 Subject: [PATCH] fix: Allow passing Global version number and build ID to frontend build --- Makefile | 11 +++++------ src/core/core.ts | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index fbba6f8..d3c7a97 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,8 @@ TSC=./node_modules/typescript/bin/tsc UGLIFYJS=./node_modules/terser/bin/terser UGLIFYCSS=./node_modules/uglifycss/uglifycss -VERSION=2.0.0 -BRANCH = a -BUILDID=$(shell git rev-parse --short HEAD) +VERSION?=2.0.0-b +BUILDID?=master GSED=sed UNAME_S := $(shell uname -s) @@ -122,7 +121,7 @@ build_javascripts: ts (cat "$${f}"; echo) >> dist/antos.js;\ rm "$${f}";\ done - echo 'OS.VERSION.version_string = "$(VERSION)-$(BRANCH)-$(BUILDID)";' >> dist/antos.js + echo 'OS.VERSION.version_string = "$(VERSION)-$(BUILDID)";' >> dist/antos.js cp dist/antos.js $(BUILDDIR)/scripts/ echo "if(exports){ exports.__esModule = true;exports.OS = OS; }" >> dist/antos.js rm -r dist/core @@ -229,8 +228,8 @@ release: main uglify doc: # npm install typedoc --save-dev # npm install typedoc-plugin-merge-modules --save-dev - # ./node_modules/.bin/typedoc --mode file --excludeNotExported --hideGenerator --name "AntOS $(VERSION)-$(BRANCH)-$(BUILDID) API" --out $(DOCDIR) - ./node_modules/.bin/typedoc --hideGenerator --plugin typedoc-plugin-merge-modules --entryPointStrategy expand --name "AntOS $(VERSION)-$(BRANCH)-$(BUILDID) API" --out $(DOCDIR) + # ./node_modules/.bin/typedoc --mode file --excludeNotExported --hideGenerator --name "AntOS $(VERSION)-$(BUILDID) API" --out $(DOCDIR) + ./node_modules/.bin/typedoc --hideGenerator --plugin typedoc-plugin-merge-modules --entryPointStrategy expand --name "AntOS $(VERSION)-$(BUILDID) API" --out $(DOCDIR) test: build_javascripts jest diff --git a/src/core/core.ts b/src/core/core.ts index 2a816fc..8c5e748 100644 --- a/src/core/core.ts +++ b/src/core/core.ts @@ -885,7 +885,7 @@ namespace OS { * Variable represents the current AntOS source code repository * is an instance of string */ - export const REPOSITORY: string = "https://github.com/lxsang/antos"; + export const REPOSITORY: string = "https://github.com/antos-rde/antos"; /** * Indicate whether the current de