🎉 Add build date and changelog to the bundle

This commit is contained in:
Andrey Antukh 2022-04-06 11:14:18 +02:00
parent 2af057a79f
commit b2607b28ff
8 changed files with 37 additions and 3 deletions

View file

@ -23,6 +23,7 @@
window.penpotTranslations = JSON.parse({{& translations}});
window.penpotThemes = {{& themes}};
window.penpotVersion = "%version%";
window.penpotBuildDate = "%buildDate%";
</script>
{{# manifest}}

View file

@ -3,6 +3,7 @@
set -ex
CURRENT_VERSION=$1;
BUILD_DATE=$(date -R);
CURRENT_HASH=${CURRENT_HASH:-$(git rev-parse --short HEAD)};
EXTRA_PARAMS=$SHADOWCLJS_EXTRA_PARAMS;
@ -14,4 +15,4 @@ npx gulp dist:clean || exit 1;
npx gulp dist:copy || exit 1;
sed -i -re "s/\%version\%/$CURRENT_VERSION/g" ./target/dist/index.html;
sed -i -re "s/\%buildDate\%/$BUILD_DATE/g" ./target/dist/index.html;

View file

@ -68,6 +68,13 @@
(-> (obj/get global "penpotVersion")
(v/parse)))
(defn parse-build-date
[global]
(let [date (obj/get global "penpotBuildDate")]
(if (= date "%buildDate%")
"unknown"
date)))
;; --- Globar Config Vars
(def default-theme "default")
@ -83,6 +90,7 @@
(def sentry-dsn (obj/get global "penpotSentryDsn"))
(def onboarding-form-id (obj/get global "penpotOnboardingQuestionsFormId"))
(def build-date (parse-build-date global))
(def flags (atom (parse-flags global)))
(def version (atom (parse-version global)))
(def target (atom (parse-target global)))

View file

@ -33,7 +33,10 @@
(log/set-level! :app :info)
(when (= :browser @cf/target)
(log/info :message "Welcome to penpot" :version (:full @cf/version) :public-uri (str cf/public-uri)))
(log/info :message "Welcome to penpot"
:version (:full @cf/version)
:build-date cf/build-date
:public-uri (str cf/public-uri)))
(declare reinit)