mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
Feature/registry improvements (#2772)
* add build cli script for cross-building cli * sdk alpha.13 * registry improvements
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
} from "../../../base/lib/types/ManifestTypes"
|
||||
import { SDKVersion } from "../StartSdk"
|
||||
import { VersionGraph } from "../version/VersionGraph"
|
||||
import { execSync } from "child_process"
|
||||
|
||||
/**
|
||||
* @description Use this function to define critical information about your package
|
||||
@@ -26,6 +27,16 @@ export function setupManifest<
|
||||
return manifest
|
||||
}
|
||||
|
||||
function gitHash(): string {
|
||||
const hash = execSync("git rev-parse HEAD").toString().trim()
|
||||
try {
|
||||
execSync("git diff-index --quiet HEAD --")
|
||||
return hash
|
||||
} catch (e) {
|
||||
return hash + "-modified"
|
||||
}
|
||||
}
|
||||
|
||||
export function buildManifest<
|
||||
Id extends string,
|
||||
Version extends string,
|
||||
@@ -56,7 +67,7 @@ export function buildManifest<
|
||||
)
|
||||
return {
|
||||
...manifest,
|
||||
gitHash: null,
|
||||
gitHash: gitHash(),
|
||||
osVersion: SDKVersion,
|
||||
version: versions.current.options.version,
|
||||
releaseNotes: versions.current.options.releaseNotes,
|
||||
|
||||
4
sdk/package/package-lock.json
generated
4
sdk/package/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@start9labs/start-sdk",
|
||||
"version": "0.3.6-alpha9",
|
||||
"version": "0.3.6-alpha.13",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@start9labs/start-sdk",
|
||||
"version": "0.3.6-alpha9",
|
||||
"version": "0.3.6-alpha.13",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@iarna/toml": "^2.2.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@start9labs/start-sdk",
|
||||
"version": "0.3.6-alpha.12",
|
||||
"version": "0.3.6-alpha.13",
|
||||
"description": "Software development kit to facilitate packaging services for StartOS",
|
||||
"main": "./package/lib/index.js",
|
||||
"types": "./package/lib/index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user