Files
api/plugin/builder/utils/consts.ts
Pujit Mehrotra 3cfe9fe9ee build: replace hash with build increment in slackware txz pkg (#1449)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Introduced support for specifying and propagating a build number
throughout the build process, including command-line options and
workflow inputs.
* TXZ package naming and URLs now include the build number for improved
traceability.

* **Improvements**
* Enhanced robustness in locating TXZ files with improved fallback
logic, especially in CI environments.
* Improved flexibility and validation of environment schema for plugin
builds.

* **Style**
  * Minor formatting corrections for consistency and readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210677942019563
2025-07-01 10:57:39 -04:00

31 lines
902 B
TypeScript

export const pluginName = "dynamix.unraid.net" as const;
export const pluginNameWithExt = `${pluginName}.plg` as const;
// Default architecture and build number for Slackware package
export const defaultArch = "x86_64" as const;
export const defaultBuild = "1" as const;
export interface TxzNameParams {
version?: string;
arch?: string;
build?: string;
}
// Get the txz name following Slackware naming convention: name-version-arch-build.txz
export const getTxzName = ({
version,
arch = defaultArch,
build = defaultBuild,
}: TxzNameParams) =>
version
? `${pluginName}-${version}-${arch}-${build}.txz`
: `${pluginName}.txz`;
export const startingDir = process.cwd();
export const BASE_URLS = {
STABLE: "https://stable.dl.unraid.net/unraid-api",
PREVIEW: "https://preview.dl.unraid.net/unraid-api",
} as const;
export const LOCAL_BUILD_TAG = "LOCAL_PLUGIN_BUILD" as const;