aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-02 20:19:30 +0800
committerFabio Berger <me@fabioberger.com>2018-07-02 20:19:30 +0800
commita619949a56937d29b3e7463812e9ea8515d21126 (patch)
tree172bc89a9a36c6be9c4e738118ec6a83a1ae9a24 /packages/monorepo-scripts/src
parent1346fa792a381cb4268b79a2167b560d44397db1 (diff)
downloaddexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.tar
dexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.tar.gz
dexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.tar.bz2
dexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.tar.lz
dexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.tar.xz
dexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.tar.zst
dexon-sol-tools-a619949a56937d29b3e7463812e9ea8515d21126.zip
Remove remote tag before local one
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts
index 1c4ee1fc6..3b4ff9082 100644
--- a/packages/monorepo-scripts/src/prepublish_checks.ts
+++ b/packages/monorepo-scripts/src/prepublish_checks.ts
@@ -34,17 +34,17 @@ async function checkGitTagsForNextVersionAndDeleteIfExistAsync(
const packageLocation = lernaPackage.location;
const nextVersion = await utils.getNextPackageVersionAsync(currentVersion, packageName, packageLocation);
- const localTagVersions = localTagVersionsByPackageName[packageName];
- if (_.includes(localTagVersions, nextVersion)) {
- const tagName = `${packageName}@${nextVersion}`;
- await utils.removeLocalTagAsync(tagName);
- }
-
const remoteTagVersions = remoteTagVersionsByPackageName[packageName];
if (_.includes(remoteTagVersions, nextVersion)) {
const tagName = `:refs/tags/${packageName}@${nextVersion}`;
await utils.removeRemoteTagAsync(tagName);
}
+
+ const localTagVersions = localTagVersionsByPackageName[packageName];
+ if (_.includes(localTagVersions, nextVersion)) {
+ const tagName = `${packageName}@${nextVersion}`;
+ await utils.removeLocalTagAsync(tagName);
+ }
}
}