Commit 4e5f08b 1 parent 590fa06 commit 4e5f08b Copy full SHA for 4e5f08b
File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " hyperapp-fx" ,
3
- "version" : " 2.0.0-beta.2 " ,
3
+ "version" : " 2.0.0-beta.3 " ,
4
4
"description" : " Effects for use with Hyperapp" ,
5
5
"type" : " module" ,
6
6
"module" : " src/index.js" ,
Original file line number Diff line number Diff line change 1
1
import { execSync } from "child_process" ;
2
- import packageJson from "./package.json" ;
3
2
import { fileURLToPath } from "url" ;
4
- import { dirname } from "path" ;
3
+ import { dirname , resolve } from "path" ;
4
+ import fs from "fs" ;
5
5
6
6
const __filename = fileURLToPath ( import . meta. url ) ;
7
7
const __dirname = dirname ( __filename ) ;
@@ -22,6 +22,10 @@ if (workingCopyChanges) {
22
22
exitWithError ( "please commit your changes before making a release!" ) ;
23
23
}
24
24
25
+ const packagePath = resolve ( __dirname , "package.json" ) ;
26
+ const packageText = fs . readFileSync ( packagePath ) ;
27
+ const packageJson = JSON . parse ( packageText ) ;
28
+
25
29
const tagExists = exec ( `git tag -l "${ packageJson . version } "` ) ;
26
30
if ( tagExists ) {
27
31
exitWithError ( `${ packageJson . version } has already been released!` ) ;
You can’t perform that action at this time.
0 commit comments