enablement-build-monorepo-version 1.0.3 → 1.0.5

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.
Files changed (2) hide show
  1. package/index.mjs +6 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -190,10 +190,13 @@ async function main(options) {
190
190
  }
191
191
  if(options.tag) {
192
192
  plist.push(new Promise((resolve,reject)=>{
193
- let rev=results[i].value.name+'@'+results[i].value.version;
194
- exec(`git describe --tags ${rev}`, (err, tag, stderr) => {
193
+ let v = results[i].value.version;
194
+ if(!v) v=getCurrentVersion(options.prefixPath,packageFolder,results[i].value.name)?.version;
195
+ let rev=results[i].value.name+'@'+v;
196
+ v=results[i].value.name+'/'+v;
197
+ exec(`git describe --tags ${v}`, (err, tag, stderr) => {
195
198
  if (err) {
196
- exec(`git tag ${rev} -m "${rev}"`, (err, tag, stderr) => {
199
+ exec(`git tag ${v} -m "${rev}"`, (err, tag, stderr) => {
197
200
  if (err) {
198
201
  reject(err);
199
202
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enablement-build-monorepo-version",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "This detects changes in the children packages of a monorepo.",
5
5
  "type": "module",
6
6
  "module": "./index.mjs",