3636
3737VERSION=$( node -p " require('./package.json').version" )
3838echo " ==> Building Itsyconnect v$VERSION "
39+ echo " "
40+
41+ step_start () { STEP_START=$SECONDS ; echo " ==> $1 ..." ; }
42+ step_done () { echo " done in $(( SECONDS - STEP_START )) s" ; echo " " ; }
3943
40- echo " ==> Compiling Electron TypeScript... "
44+ step_start " Compiling Electron TypeScript"
4145npm run electron:compile
46+ step_done
4247
43- echo " ==> Building Next.js... "
48+ step_start " Building Next.js"
4449npx next build
50+ step_done
4551
46- echo " ==> Preparing standalone bundle... "
52+ step_start " Preparing standalone bundle"
4753npm run electron:prepare
54+ step_done
4855
49- echo " ==> Making DMG + ZIP (signing + notarizing)... "
56+ step_start " Making DMG + ZIP (signing + notarizing)"
5057npx electron-forge make
58+ step_done
5159
5260# Find outputs and rename DMG to stable filename for /releases/latest/download/Itsyconnect.dmg
5361ORIG_DMG=$( find out/make -name " *.dmg" -type f | head -1)
@@ -67,19 +75,20 @@ mv "$ORIG_DMG" "$DMG_PATH"
6775
6876DMG_SHA=$( shasum -a 256 " $DMG_PATH " | cut -d' ' -f1)
6977
70- echo " "
7178echo " ==> Build complete!"
72- echo " DMG: $DMG_PATH "
73- echo " ZIP: $ZIP_PATH "
79+ echo " DMG: $DMG_PATH ( $( du -h " $DMG_PATH " | cut -f1 | xargs ) ) "
80+ echo " ZIP: $ZIP_PATH ( $( du -h " $ZIP_PATH " | cut -f1 | xargs ) ) "
7481echo " SHA256 (DMG): $DMG_SHA "
75-
7682echo " "
77- echo " ==> Creating draft GitHub release v$VERSION ..."
83+
84+ step_start " Creating draft GitHub release v$VERSION "
7885gh release create " v$VERSION " " $DMG_PATH " " $ZIP_PATH " \
7986 --title " v$VERSION " \
8087 --draft \
8188 --generate-notes
89+ step_done
8290
83- echo " "
84- echo " ==> Done! Review the draft release on GitHub, then publish it."
91+ TOTAL=$(( SECONDS ))
92+ echo " ==> All done in $(( TOTAL / 60 )) m $(( TOTAL % 60 )) s"
93+ echo " Review the draft release on GitHub, then publish it."
8594echo " https://github.com/nickustinov/itsyconnect-macos/releases"
0 commit comments