zarro 1.183.0 → 1.183.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gulp-tasks/modules/nuget-push.js +1 -1
- package/gulp-tasks/nuget-push.js +17 -2
- package/package.json +2 -2
- package/types.d.ts +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
return !!executable.match(/^dotnet(:?\.exe)?$/i);
|
|
8
8
|
}
|
|
9
9
|
async function pushWithDotnet(opts) {
|
|
10
|
-
await dotnetCli.nugetPush(opts);
|
|
10
|
+
return await dotnetCli.nugetPush(opts);
|
|
11
11
|
}
|
|
12
12
|
async function nugetPush(packageFile, sourceName, options) {
|
|
13
13
|
const nugetPushSource = sourceName ||
|
package/gulp-tasks/nuget-push.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const exec_step_1 = require("exec-step");
|
|
2
4
|
(function () {
|
|
3
5
|
gulp.task("nuget-push", "Pushes the latest versions of packages in the package build dir", async () => {
|
|
4
|
-
const { ctx } = require("exec-step"), debug = requireModule("debug")(__filename), path = require("path"), nugetPush = requireModule("nuget-push"), { ls, FsEntities } = require("yafs"), env = requireModule("env"), folder = env.resolve(env.PACK_TARGET_FOLDER), versionRe = /^(?<id>[A-Za-z\.]+)\.(?<version>\d\.\d\.\d)(-(?<tag>.*))?\.nupkg$/, packages = await ls(folder, {
|
|
6
|
+
const SystemError = requireModule("system-error"), { ctx } = require("exec-step"), debug = requireModule("debug")(__filename), path = require("path"), nugetPush = requireModule("nuget-push"), { ls, FsEntities } = require("yafs"), env = requireModule("env"), folder = env.resolve(env.PACK_TARGET_FOLDER), versionRe = /^(?<id>[A-Za-z\.]+)\.(?<version>\d\.\d\.\d)(-(?<tag>.*))?\.nupkg$/, packages = await ls(folder, {
|
|
5
7
|
recurse: false,
|
|
6
8
|
entities: FsEntities.files,
|
|
7
9
|
match: versionRe
|
|
@@ -28,7 +30,20 @@
|
|
|
28
30
|
return;
|
|
29
31
|
}
|
|
30
32
|
for (const file of toPush) {
|
|
31
|
-
await ctx.exec(`⬆️ pushing ${file}`, async () =>
|
|
33
|
+
await ctx.exec(`⬆️ pushing ${file}`, async () => {
|
|
34
|
+
const result = await nugetPush(path.join(folder, file));
|
|
35
|
+
if (SystemError.isError(result)) {
|
|
36
|
+
throw result;
|
|
37
|
+
}
|
|
38
|
+
if (SystemError.isResult(result)) {
|
|
39
|
+
const res = result;
|
|
40
|
+
const io = res.stderr.concat(res.stdout);
|
|
41
|
+
const isConflict = io.find(s => s.includes("409"));
|
|
42
|
+
if (isConflict) {
|
|
43
|
+
throw new exec_step_1.ExecStepOverrideMessage(`${path.basename(file)} NOT pushed: this version already exists at the registry.`, new Error('dummy'), false);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
32
47
|
}
|
|
33
48
|
});
|
|
34
49
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zarro",
|
|
3
|
-
"version": "1.183.
|
|
3
|
+
"version": "1.183.1",
|
|
4
4
|
"description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
|
|
5
5
|
"bin": {
|
|
6
6
|
"zarro": "index.js"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"decompress": "^4.2.1",
|
|
62
62
|
"del": "^5.1.0",
|
|
63
63
|
"event-stream": "^4.0.1",
|
|
64
|
-
"exec-step": "^0.
|
|
64
|
+
"exec-step": "^0.15.0",
|
|
65
65
|
"fancy-log": "^1.3.3",
|
|
66
66
|
"gulp": "^5.0.0",
|
|
67
67
|
"gulp-debug": "^4.0.0",
|
package/types.d.ts
CHANGED
|
@@ -987,7 +987,7 @@ declare global {
|
|
|
987
987
|
|
|
988
988
|
type GitTagFromCsProj = (options?: GitTagOptions) => Stream;
|
|
989
989
|
type GitFetch = (all: boolean) => Promise<void>;
|
|
990
|
-
type NugetPush = (packageFile: string, sourceName?: string, options?: NugetPushOpts) => Promise<
|
|
990
|
+
type NugetPush = (packageFile: string, sourceName?: string, options?: NugetPushOpts) => Promise<SystemError | SystemResult | undefined>;
|
|
991
991
|
|
|
992
992
|
interface ParseNugetVersion {
|
|
993
993
|
parseNugetVersion(versionStringOrFileName: string): Version;
|