enablement-build-monorepo-version 1.0.4 → 1.0.6
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/index.mjs +6 -10
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -172,7 +172,6 @@ async function main(options) {
|
|
|
172
172
|
changeList.push(results[i].value.name)
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
let plist=[];
|
|
176
175
|
for(let i=0;i<results.length;i++) {
|
|
177
176
|
if(results[i].value.packageFolder!==packageFolder) continue;
|
|
178
177
|
if(options.version) {
|
|
@@ -182,20 +181,21 @@ async function main(options) {
|
|
|
182
181
|
if(results[i].value.changed) {
|
|
183
182
|
console.log(`##vso[task.setvariable variable=${safeName};isoutput=true;]${results[i].value.version}`);
|
|
184
183
|
if(options.saveVersion) {
|
|
185
|
-
|
|
184
|
+
scanlist.push(updateVersion(packageFolder,results[i].value.name,results[i].value.version));
|
|
186
185
|
}
|
|
187
186
|
} else {
|
|
188
187
|
console.log(`##vso[task.setvariable variable=${safeName};isoutput=true;]${results[i].value.previous}`);
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
190
|
if(options.tag) {
|
|
192
|
-
|
|
191
|
+
scanlist.push(new Promise((resolve,reject)=>{
|
|
193
192
|
let v = results[i].value.version;
|
|
194
193
|
if(!v) v=getCurrentVersion(options.prefixPath,packageFolder,results[i].value.name)?.version;
|
|
195
194
|
let rev=results[i].value.name+'@'+v;
|
|
196
|
-
|
|
195
|
+
v=results[i].value.name+'/'+v;
|
|
196
|
+
exec(`git describe --tags ${v}`, (err, tag, stderr) => {
|
|
197
197
|
if (err) {
|
|
198
|
-
exec(`git tag ${
|
|
198
|
+
exec(`git tag ${v} -m "${rev}"`, (err, tag, stderr) => {
|
|
199
199
|
if (err) {
|
|
200
200
|
reject(err);
|
|
201
201
|
return;
|
|
@@ -208,10 +208,6 @@ async function main(options) {
|
|
|
208
208
|
}));
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
if(plist.length>0) {
|
|
212
|
-
let result = await Promise.allSettled(plist)
|
|
213
|
-
if(options.debug) console.log(result);
|
|
214
|
-
}
|
|
215
211
|
}
|
|
216
212
|
|
|
217
213
|
// write current hashes
|
|
@@ -242,7 +238,6 @@ async function main(options) {
|
|
|
242
238
|
console.log(`CHANGED - ${JSON.stringify(changeList)}`);
|
|
243
239
|
console.log(`##vso[task.setvariable variable=changed;isoutput=true]${JSON.stringify(changeList)}`);
|
|
244
240
|
}
|
|
245
|
-
|
|
246
241
|
mainResolve("DONE");
|
|
247
242
|
},mainreject);
|
|
248
243
|
});
|
|
@@ -300,6 +295,7 @@ if (process.argv.length === 2) {
|
|
|
300
295
|
const text = await main(options);
|
|
301
296
|
console.log(text);
|
|
302
297
|
} catch (e) {
|
|
298
|
+
console.log("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK")
|
|
303
299
|
console.log(e);
|
|
304
300
|
process.exit(1);
|
|
305
301
|
}
|