mirror of https://github.com/actions/setup-go.git
Introduce new stable alias type
This commit is contained in:
parent
d33323e2b9
commit
5552b45f54
|
@ -8,6 +8,7 @@ import fs from 'fs';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
|
||||||
type InstallationType = 'dist' | 'manifest';
|
type InstallationType = 'dist' | 'manifest';
|
||||||
|
export type StableAliasType = 'stable' | 'oldstable';
|
||||||
|
|
||||||
export interface IGoVersionFile {
|
export interface IGoVersionFile {
|
||||||
filename: string;
|
filename: string;
|
||||||
|
@ -175,7 +176,7 @@ export async function extractGoArchive(archivePath: string): Promise<string> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInfoFromManifest(
|
export async function getInfoFromManifest(
|
||||||
versionSpec: string,
|
versionSpec: string | StableAliasType,
|
||||||
stable: boolean,
|
stable: boolean,
|
||||||
auth: string | undefined,
|
auth: string | undefined,
|
||||||
arch = os.arch()
|
arch = os.arch()
|
||||||
|
|
|
@ -4,7 +4,7 @@ import * as installer from './installer';
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {restoreCache} from './cache-restore';
|
import {restoreCache} from './cache-restore';
|
||||||
import {isGhes, isCacheFeatureAvailable} from './cache-utils';
|
import {isCacheFeatureAvailable} from './cache-utils';
|
||||||
import cp from 'child_process';
|
import cp from 'child_process';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
@ -150,7 +150,7 @@ function resolveVersionInput(): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resolveStableVersionInput(
|
async function resolveStableVersionInput(
|
||||||
versionSpec: string,
|
versionSpec: installer.StableAliasType,
|
||||||
auth: string | undefined,
|
auth: string | undefined,
|
||||||
arch = os.arch()
|
arch = os.arch()
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
|
Loading…
Reference in New Issue