add build number (for page footer)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import { metaData, API_URL } from "../config";
|
||||
import RandomMsg from "../components/RandomMsg";
|
||||
import { buildTime } from '../utils/buildTime.js';
|
||||
import { buildTime, buildNumber } from '../utils/buildTime.js';
|
||||
|
||||
const YEAR = new Date().getFullYear();
|
||||
var ENVIRONMENT = (Astro.url.hostname === "localhost") ? "Dev": "Prod";
|
||||
@@ -16,7 +16,9 @@ var ENVIRONMENT = (Astro.url.hostname === "localhost") ? "Dev": "Prod";
|
||||
</small>
|
||||
<RandomMsg client:only="react" />
|
||||
<div style="margin-top: 15px; bottom: 0%">
|
||||
<small>Built: {buildTime} UTC</small>
|
||||
<small>Build# {buildNumber}
|
||||
<br>
|
||||
Built: {buildTime} UTC</small>
|
||||
</div>
|
||||
<span style="font-size: 0.75rem; font-style: italic; margin-left: 100%">{ENVIRONMENT}</span>
|
||||
</div>
|
||||
|
@@ -12,3 +12,7 @@ export const api = "https://api.codey.lol";
|
||||
export const API_URL = api;
|
||||
export const socialLinks = {
|
||||
};
|
||||
|
||||
export const MAJOR_VERSION = "0.0"
|
||||
export const RELEASE_FLAG = "Alpha";
|
||||
let l = "21f";
|
@@ -1,3 +1,10 @@
|
||||
import { generate, validate, parse, format } from "build-number-generator";
|
||||
import { MAJOR_VERSION, RELEASE_FLAG } from "../config";
|
||||
export const buildTime = new Date().toLocaleString(undefined, {
|
||||
timeZone: "UTC",
|
||||
});
|
||||
|
||||
export var buildNumber = generate(MAJOR_VERSION);
|
||||
if (RELEASE_FLAG.length) {
|
||||
buildNumber = `${buildNumber} (${RELEASE_FLAG})`;
|
||||
}
|
Reference in New Issue
Block a user