Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Electron アプリのビルド + 配信自動化

53bc8fa21f71dd8e63f3c94275c56191?s=47 ngs
February 10, 2016

Electron アプリのビルド + 配信自動化

#meguroes 2 にて発表させていただいたスライドです。

53bc8fa21f71dd8e63f3c94275c56191?s=128

ngs

February 10, 2016
Tweet

More Decks by ngs

Other Decks in Programming

Transcript

  1. Electron ΞϓϦͷ Ϗϧυ + ഑৴ࣗಈԽ Atsushi Nagase @ngs / http://ja.ngs.io/

    https://one-team.com/products/
  2. νʔϜͷڠಉΛαϙʔτ͢ΔαʔϏεΛఏڙ͍ͯ͠·͢ɻ

  3. None
  4. τϐοΫΛ࡞੒ͯ͠ɺ

  5. ϦΞϧλΠϜʹٞ࿦ΛੵΈॏͶͯ ࢓ࣄΛਐΊ͍ͯ͘ιϑτ΢ΣΞͰ͢

  6. Tech Stack Frontend Deploy Backend API Distribute

  7. None
  8. Deploy • docker build -t $TARGET docker • docker push

    "${DOCKER_REPO}:${TAG_WEB}-staging-b${CIRCLE_BUILD_NUM}" • npm run asset:sync (to AWS S3) • aws ecs update-service --cluster ${CLUSTER} —service ... • webpack --config config/webpack.config.babel.js • jade src/templates/index.jade --out build ⛏ Build Distribute • electron-packager ./app Oneteam --out build --platform=darwin ... • electron-builder $BUILT --platform=osx --out=$DIR ... • codesign --deep --force --verify --verbose --sign "$identity" "$app" ... • productbuild --component "$APP_PATH" /Applications ... • slack-notify
  9. Deploy • docker build -t $TARGET docker • docker push

    "${DOCKER_REPO}:${TAG_WEB}-staging-b${CIRCLE_BUILD_NUM}" • npm run asset:sync (to AWS S3) • aws ecs update-service --cluster ${CLUSTER} —service ... • webpack --config config/webpack.config.babel.js • jade src/templates/index.jade --out build ⛏ Build Distribute • electron-packager ./app Oneteam --out build --platform=darwin ... • electron-builder $BUILT --platform=osx --out=$DIR ... • codesign --deep --force --verify --verbose --sign "$identity" "$app" ... • productbuild --component "$APP_PATH" /Applications ... • slack-notify Darwin!!!1! git add -A build && cd build git push --force $YET_ANOTHER_GIT_REPO $CIRCLE_BRANCH
  10. Setup ূ໌ॻͷಡΈࠐΈ

  11. Setup Homebrew Ͱඞཁͳιϑτ΢ΣΞͷΠϯετʔϧ

  12. Setup Homebrew Ͱඞཁͳιϑτ΢ΣΞͷΠϯετʔϧ

  13. Setup Homebrew Ͱඞཁͳιϑτ΢ΣΞͷΠϯετʔϧ cd /usr/local tar cvfz $CIRCLE_ARTIFACTS/HomebrewCellar.tgz Cellar

  14. #

  15. electron-packager ./app Oneteam \ --out build \ --platform=darwin --arch=x64 \

    --version=$ELECTRON_VERSION \ --build-version=$BUILD_NUM \ --app-bundle-id=$BUNDLE_ID_PREFIX.Oneteam \ --app-version=$VERSION \ --asar \ --helper-bundle-id=$BUNDLE_ID_PREFIX.OneteamHelper \ --icon=assets/osx/app.icns \ --overwrite \ --sign 'Developer ID Application: Oneteam Inc. (579B4336F6)' https://github.com/maxogden/electron-packager
  16. electron-builder build/Oneteam-darwin-x64/Oneteam.app \ --platform=osx --out=$DIR --config=packager.json electron-builder build/Oneteam-win32-ia32 \ --platform=win

    --out=$DIR --config=packager.json https://github.com/loopline-systems/electron-builder
  17. aws s3 sync dist \ "s3://$S3BUCKET/desktop/${VERSION}/b${BUILD_NUM}" \ --acl public-read curl

    -X POST --data-urlencode "payload={ ... }" \ $SLACK_WEBHOOK_URL
  18. TODO

  19. Windows ༻ͷূ໌ॻͷΠϯετʔϧ TODO

  20. TODO Auto Updater ͷઃఆ http://electron.atom.io/docs/v0.36.7/api/auto-updater/

  21. https://one-team.com/ja/recruit/ We're HIRING

  22. ଟँ