Feature/registry improvements (#2772)

* add build cli script for cross-building cli

* sdk alpha.13

* registry improvements
This commit is contained in:
Aiden McClelland
2024-11-05 20:38:52 -07:00
committed by GitHub
parent 020268fe67
commit b79c029f21
19 changed files with 636 additions and 89 deletions

View File

@@ -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,

View File

@@ -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",

View File

@@ -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",