File tree 2 files changed +36
-1
lines changed
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 9
9
"scripts" : {
10
10
"test" : " forge test" ,
11
11
"version:bump" : " yarn workspace @zk-kit/${0}.sol version ${1} && yarn remove:stable-version-field ${0} && NO_HOOK=1 git commit -am \" chore(${0}): v${1}\" && git tag ${0}.sol-v${1}" ,
12
- "version:publish" : " yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public " ,
12
+ "version:publish" : " scripts/ publish.sh " ,
13
13
"version:release" : " changelogithub" ,
14
14
"format" : " prettier -c . && forge fmt --check" ,
15
15
"format:write" : " prettier -w . && forge fmt" ,
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ set -eu
4
+
5
+ publish_npm () {
6
+ yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public
7
+ }
8
+
9
+ clean_root () {
10
+ pkg=" $1 "
11
+ exclude_regex=" \./\.git\|\./packages\|\./\|\./packages/$pkg \|\./LICENSE"
12
+ find . -maxdepth 1 -not -regex " $exclude_regex " -exec rm -rf {} +
13
+ }
14
+
15
+ publish_forge_pkg () {
16
+ pkg=" $1 "
17
+ version=$( jq -r ' .version' " packages/$pkg /package.json" )
18
+
19
+ clean_root " $pkg "
20
+ mv " packages/$pkg /{src,README.md}" .
21
+ rm -fr " packages/$pkg "
22
+
23
+ git checkout -b " $package "
24
+ git commit -am " $version "
25
+ git push origin " $package "
26
+ }
27
+
28
+ main () {
29
+ pkg=" $1 "
30
+ clean_root " $pkg "
31
+ publish_forge
32
+ publish_npm
33
+ }
34
+
35
+ main " $@ "
You can’t perform that action at this time.
0 commit comments