feat: update application versioning and enhance release management
Docker images / prepare-release (push) Successful in 38s
Docker images / backend-image (push) Has been skipped
Docker images / frontend-image (push) Has been skipped
Docker images / updater-image (push) Has been skipped
Docker images / publish-release (push) Has been skipped
Docker images / notify-webhook (push) Has been skipped
Docker images / prepare-release (push) Successful in 38s
Docker images / backend-image (push) Has been skipped
Docker images / frontend-image (push) Has been skipped
Docker images / updater-image (push) Has been skipped
Docker images / publish-release (push) Has been skipped
Docker images / notify-webhook (push) Has been skipped
- Bumped application version to 1.0.0 across all relevant package files, ensuring consistency in versioning. - Introduced new environment variables for application version and release URL in Dockerfiles, improving deployment transparency. - Enhanced the health check endpoint to return the current application version, providing better visibility for monitoring. - Updated CI/CD workflows to include steps for preparing and publishing releases, streamlining the release process. - Added a new "Releases" section in the application sidebar for easier access to version information.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import packageJson from "@/package.json"
|
||||
|
||||
const packageVersion = packageJson.version
|
||||
|
||||
export function getAppVersion(): string {
|
||||
return process.env.NEXT_PUBLIC_APP_VERSION?.trim() || `${packageVersion}-dev`
|
||||
}
|
||||
|
||||
export function formatAppVersionLabel(version = getAppVersion()): string {
|
||||
return `v${version}`
|
||||
}
|
||||
|
||||
export function getReleaseUrl(): string | null {
|
||||
const value = process.env.NEXT_PUBLIC_RELEASE_URL?.trim()
|
||||
return value || null
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { readFileSync } from "node:fs"
|
||||
import { join } from "node:path"
|
||||
|
||||
export interface ReleaseCommit {
|
||||
sha: string
|
||||
shortSha: string
|
||||
subject: string
|
||||
author: string
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface ReleaseManifest {
|
||||
version: string
|
||||
tag: string
|
||||
publishedAt: string | null
|
||||
releaseUrl: string
|
||||
commits: ReleaseCommit[]
|
||||
}
|
||||
|
||||
const fallbackManifest: ReleaseManifest = {
|
||||
version: "1.0.0",
|
||||
tag: "v1.0.0",
|
||||
publishedAt: null,
|
||||
releaseUrl: "",
|
||||
commits: [],
|
||||
}
|
||||
|
||||
export function readReleaseManifest(): ReleaseManifest {
|
||||
try {
|
||||
const filePath = join(process.cwd(), "public", "release-manifest.json")
|
||||
const raw = readFileSync(filePath, "utf8")
|
||||
return JSON.parse(raw) as ReleaseManifest
|
||||
} catch {
|
||||
return fallbackManifest
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user