@ -2058,7 +2058,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return ( mod && mod . _ _esModule ) ? mod : { "default" : mod } ;
return ( mod && mod . _ _esModule ) ? mod : { "default" : mod } ;
} ;
} ;
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
exports . addBinToPath = exports . run = void 0 ;
exports . parseGoVersion = exports . addBinToPath = exports . run = void 0 ;
const core = _ _importStar ( _ _webpack _require _ _ ( 470 ) ) ;
const core = _ _importStar ( _ _webpack _require _ _ ( 470 ) ) ;
const io = _ _importStar ( _ _webpack _require _ _ ( 1 ) ) ;
const io = _ _importStar ( _ _webpack _require _ _ ( 1 ) ) ;
const installer = _ _importStar ( _ _webpack _require _ _ ( 749 ) ) ;
const installer = _ _importStar ( _ _webpack _require _ _ ( 749 ) ) ;
@ -2100,12 +2100,7 @@ function run() {
let goPath = yield io . which ( 'go' ) ;
let goPath = yield io . which ( 'go' ) ;
let goVersion = ( child _process _1 . default . execSync ( ` ${ goPath } version ` ) || '' ) . toString ( ) ;
let goVersion = ( child _process _1 . default . execSync ( ` ${ goPath } version ` ) || '' ) . toString ( ) ;
core . info ( goVersion ) ;
core . info ( goVersion ) ;
// get the installed version as an Action output
core . setOutput ( 'go-version' , parseGoVersion ( goVersion ) ) ;
// based on go/src/cmd/go/internal/version/version.go:
// fmt.Printf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
// expecting go<version> for runtime.Version()
let goVersionOutput = [ ... goVersion . split ( ' ' ) [ 2 ] ] . slice ( 2 ) . join ( '' ) ;
core . setOutput ( 'go-version' , goVersionOutput ) ;
core . startGroup ( 'go env' ) ;
core . startGroup ( 'go env' ) ;
let goEnv = ( child _process _1 . default . execSync ( ` ${ goPath } env ` ) || '' ) . toString ( ) ;
let goEnv = ( child _process _1 . default . execSync ( ` ${ goPath } env ` ) || '' ) . toString ( ) ;
core . info ( goEnv ) ;
core . info ( goEnv ) ;
@ -2151,6 +2146,14 @@ function isGhes() {
const ghUrl = new url _1 . URL ( process . env [ 'GITHUB_SERVER_URL' ] || 'https://github.com' ) ;
const ghUrl = new url _1 . URL ( process . env [ 'GITHUB_SERVER_URL' ] || 'https://github.com' ) ;
return ghUrl . hostname . toUpperCase ( ) !== 'GITHUB.COM' ;
return ghUrl . hostname . toUpperCase ( ) !== 'GITHUB.COM' ;
}
}
function parseGoVersion ( versionString ) {
// get the installed version as an Action output
// based on go/src/cmd/go/internal/version/version.go:
// fmt.Printf("go version %s %s/%s\n", runtime.Version(), runtime.GOOS, runtime.GOARCH)
// expecting go<version> for runtime.Version()
return versionString . split ( ' ' ) [ 2 ] . slice ( 'go' . length ) ;
}
exports . parseGoVersion = parseGoVersion ;
//# sourceMappingURL=main.js.map
//# sourceMappingURL=main.js.map
/***/ } ) ,
/***/ } ) ,