zarro 1.170.2 → 1.170.4
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/nuget-push.js +15 -0
- package/package.json +1 -1
package/gulp-tasks/nuget-push.js
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
entities: FsEntities.files,
|
|
7
7
|
match: versionRe
|
|
8
8
|
}), sorted = packages.sort().reverse(), seen = new Set();
|
|
9
|
+
if (sorted.length === 0) {
|
|
10
|
+
throw new Error(`No .nupkg files found in ${path.resolve(folder)}`);
|
|
11
|
+
}
|
|
12
|
+
const toPush = [];
|
|
9
13
|
for (const file of sorted) {
|
|
10
14
|
const match = file.match(versionRe), id = match === null || match === void 0 ? void 0 : match.groups["id"];
|
|
11
15
|
if (seen.has(id)) {
|
|
@@ -13,6 +17,17 @@
|
|
|
13
17
|
continue;
|
|
14
18
|
}
|
|
15
19
|
seen.add(id);
|
|
20
|
+
toPush.push(file);
|
|
21
|
+
}
|
|
22
|
+
if (env.resolveFlag(env.DRY_RUN)) {
|
|
23
|
+
const log = requireModule("log");
|
|
24
|
+
log.info("DRY_RUN set, would have pushed packages:");
|
|
25
|
+
for (const item of toPush) {
|
|
26
|
+
log.info(` ${item}`);
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
for (const file of toPush) {
|
|
16
31
|
await nugetPush(path.join(folder, file));
|
|
17
32
|
}
|
|
18
33
|
});
|