Skip to content

Commit

Permalink
2.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
okwolf committed Jun 17, 2024
1 parent 590fa06 commit 4e5f08b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperapp-fx",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Effects for use with Hyperapp",
"type": "module",
"module": "src/index.js",
Expand Down
8 changes: 6 additions & 2 deletions release.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { execSync } from "child_process";
import packageJson from "./package.json";
import { fileURLToPath } from "url";
import { dirname } from "path";
import { dirname, resolve } from "path";
import fs from "fs";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -22,6 +22,10 @@ if (workingCopyChanges) {
exitWithError("please commit your changes before making a release!");
}

const packagePath = resolve(__dirname, "package.json");
const packageText = fs.readFileSync(packagePath);
const packageJson = JSON.parse(packageText);

const tagExists = exec(`git tag -l "${packageJson.version}"`);
if (tagExists) {
exitWithError(`${packageJson.version} has already been released!`);
Expand Down

0 comments on commit 4e5f08b

Please sign in to comment.