mirror of
https://github.com/NuGet/setup-nuget.git
synced 2025-12-06 07:48:23 +08:00
misc: updating build files
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
@@ -20,6 +21,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const tc = __importStar(require("@actions/tool-cache"));
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const pick_version_1 = __importDefault(require("./pick-version"));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
@@ -37,7 +40,9 @@ function run() {
|
||||
core.addPath(cachePath);
|
||||
}
|
||||
else {
|
||||
// TODO - maybe write a wrapper script that achieves this.
|
||||
const scriptPath = path.join(cachePath, 'nuget');
|
||||
fs.writeFileSync(scriptPath, `#!/bin/sh\nmono nuget.exe $@`);
|
||||
fs.chmodSync(scriptPath, '755');
|
||||
core.exportVariable('NUGET', `${cachePath}/nuget.exe`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
@@ -55,7 +56,7 @@ function fetchVersions() {
|
||||
return (yield fetch('https://dist.nuget.org/tools.json')
|
||||
.then(j => j.json())
|
||||
.then(n => n['nuget.exe'])).map(v => {
|
||||
return Object.assign({}, v, { uploaded: new Date(v.uploaded) });
|
||||
return Object.assign(Object.assign({}, v), { uploaded: new Date(v.uploaded) });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user