Skip to content

Commit

Permalink
Updated publish script again
Browse files Browse the repository at this point in the history
  • Loading branch information
davenquinn committed Oct 25, 2024
1 parent a251eb2 commit d77bba2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/ui-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [4.0.7] - 2024-10-24

## [4.0.6] - 2024-10-24

## [4.0.5] - 2024-10-24

## [4.0.4] - 2024-10-24

Fix bad build instructions
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@macrostrat/ui-components",
"version": "4.0.6",
"version": "4.0.7",
"description": "UI components for React and Blueprint.js",
"main": "dist/main.cjs",
"module": "dist/module.mjs",
Expand Down
10 changes: 5 additions & 5 deletions scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import { prepareModule } from "./prepare";

/* tries to run npm publish and if succeeds adds a tag to the repo*/
function publishModule(dir, pkg) {
pkg = getPackageData(pkg);
logAction(pkg, "Publishing", chalk.magenta);
const pkgData = getPackageData(pkg);
logAction(pkgData, "Publishing", chalk.magenta);
try {
execSync("yarn npm publish --access public", {
cwd: dir,
stdio: "inherit",
});
console.log(chalk.blueBright.bold("Tagging version"));
const tag = moduleString(pkg, "-v");
const msg = moduleString(pkg, " version ");
const tag = moduleString(pkgData, "-v");
const msg = moduleString(pkgData, " version ");
execSync(`git tag -a ${tag} -m '${msg}'`, { cwd: dir });
} catch (error) {
console.error(`Failed to publish ${moduleString(pkg)}, ${error}`);
console.error(`Failed to publish ${moduleString(pkgData)}, ${error}`);
}
}

Expand Down

0 comments on commit d77bba2

Please sign in to comment.