build: add platform settings

This commit is contained in:
2024-07-01 16:56:56 +08:00
parent e22c95c327
commit 7dbac8c1b3

View File

@@ -1,9 +1,26 @@
export interface Platform {
/**
* The architecture
*/
arch: 'x86_64' | 'aarch64' | string;
};
type PackagePhase = (task: PackageTask) => Promise<void>;
/**
* Sufficient information for representing current packaging platform.
*/
export interface PackagePlatform {
hostPlatform: Platform;
buildPlatform: Platform;
}
export interface PackageTask {
name: string;
patchPhase?: (task: PackageTask) => Promise<void>;
configurePhase?: (task: PackageTask) => Promise<void>;
buildPhase?: (task: PackageTask) => Promise<void>;
installPhase?: (task: PackageTask) => Promise<void>;
patchPhase?: PackagePhase;
configurePhase?: PackagePhase;
buildPhase?: PackagePhase;
installPhase?: PackagePhase;
[key: string]: any;
}