File tree 2 files changed +21
-8
lines changed
2 files changed +21
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @inkathon/contracts " : patch
3
+ " @inkathon/frontend " : patch
4
+ ---
5
+
6
+ allow postinstall to work with new contracts instead of only packaged greeter
Original file line number Diff line number Diff line change @@ -5,13 +5,20 @@ set -eu
5
5
# This is kind of a hack to prevent a nasty Next.js error when running the frontend
6
6
# for the first time after deploying to a local node which forces to clear `frontend/.next`.
7
7
8
- if [[ ! -e deployments/greeter/development.ts ]]; then
9
- echo " Creating empty 'development.ts'…"
10
- if command -v touch & > /dev/null; then
11
- touch deployments/greeter/development.ts
8
+ for dir in " ./src/" * /; do
9
+ contract_name=$( basename " ${dir} " )
10
+
11
+ if [[ ! -e " ./deployments/${contract_name} /development.ts" ]]; then
12
+ echo " Creating empty 'development.ts' file for ${contract_name} "
13
+
14
+ mkdir -p " ./deployments/${contract_name} "
15
+
16
+ if command -v touch & > /dev/null; then
17
+ touch " ./deployments/${contract_name} /development.ts"
18
+ else
19
+ copy /b " deployments/${contract_name} /development.ts" +,,
20
+ fi
12
21
else
13
- copy /b deployments/greeter/ development.ts +,,
22
+ echo " Great, ' development.ts' already exists! Skipping… "
14
23
fi
15
- else
16
- echo " Great, 'development.ts' already exists! Skipping…"
17
- fi
24
+ done
You can’t perform that action at this time.
0 commit comments