setup-cpp
Version:
Install all the tools required for building and testing C++/C projects.
63 lines (62 loc) • 1.85 kB
TypeScript
export type AddAptKeyOptions = KeyServerOptions | KeyUrl;
/**
* Add an apt key
* @param options The options for adding the key
* @returns The file name of the key that was added or `undefined` if it failed
*
* @example
* ```ts
* await addAptKey({ key: "3B4FE6ACC0B21F32" fileName: "bazel-archive-keyring.gpg"})
* ```
*
* @example
* ```ts
* await addAptKey({ keyUrl: "https://bazel.build/bazel-release.pub.gpg", fileName: "bazel-archive-keyring.gpg"})
* ```
*/
export declare function addAptKey(options: AddAptKeyOptions): Promise<string | undefined>;
type GpgKeyOptions = {
/**
* The file name for the key (should end in `.gpg`)
*/
fileName: string;
/**
* The key store path (Defaults to `/etc/apt/trusted.gpg.d`)
*/
keyStorePath?: string;
};
export declare const defaultKeyStorePath = "/etc/apt/trusted.gpg.d";
export type KeyServerOptions = {
/**
* The key to add
*
* @example
* ```ts
* "3B4FE6ACC0B21F32"
* ```
*/
key: string;
/**
* The keyserver to use (Defaults to `keyserver.ubuntu.com`)
*/
keyServer?: string;
} & GpgKeyOptions;
export declare const defaultKeyServer = "keyserver.ubuntu.com";
/**
* Add an apt key via a keyserver
* @returns The file name of the key that was added or `undefined` if it failed
*/
export declare function addAptKeyViaServer({ key, keyServer, fileName, keyStorePath }: KeyServerOptions): Promise<string | undefined>;
export type KeyUrl = {
/**
* The URL to download the key from
*/
keyUrl: string;
} & GpgKeyOptions;
/**
* Add an apt key via a download
* @param options The options for adding the key
* @returns The file name of the key that was added
*/
export declare function addAptKeyViaURL({ keyUrl, fileName, keyStorePath }: KeyUrl): Promise<string | undefined>;
export {};