2017-09-20 18:42:33 -04:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:7.10
|
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-12 21:11:23 -04:00
|
|
|
- v2-dependencies-build-{{ checksum "omega-build/package.json" }}
|
|
|
|
- v2-dependencies-build
|
2017-09-20 18:42:33 -04:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-12 21:11:23 -04:00
|
|
|
- v2-dependencies-pac-{{ checksum "omega-pac/package.json" }}
|
|
|
|
- v2-dependencies-pac
|
2017-09-20 18:42:33 -04:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-12 21:11:23 -04:00
|
|
|
- v2-dependencies-target-{{ checksum "omega-target/package.json" }}
|
|
|
|
- v2-dependencies-target
|
2017-09-20 18:42:33 -04:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-12 21:11:23 -04:00
|
|
|
- v2-dependencies-web-{{ checksum "omega-web/package.json" }}
|
|
|
|
- v2-dependencies-web
|
2017-09-20 18:42:33 -04:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-12 21:11:23 -04:00
|
|
|
- v2-dependencies-webbower-{{ checksum "omega-web/bower.json" }}
|
|
|
|
- v2-dependencies-webbower
|
2017-09-20 18:42:33 -04:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-08-12 21:11:23 -04:00
|
|
|
- v2-dependencies-targetchromium-{{ checksum "omega-target-chromium-extension/package.json" }}
|
|
|
|
- v2-dependencies-targetchromium
|
2017-09-20 18:42:33 -04:00
|
|
|
|
|
|
|
- run: sudo npm install -g grunt-cli bower web-ext json
|
|
|
|
- run: (cd omega-build && npm run deps)
|
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- omega-build/node_modules
|
2018-08-12 21:11:23 -04:00
|
|
|
key: v2-dependencies-build-{{ checksum "omega-build/package.json" }}
|
2017-09-20 18:42:33 -04:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- omega-pac/node_modules
|
2018-08-12 21:11:23 -04:00
|
|
|
key: v2-dependencies-pac-{{ checksum "omega-pac/package.json" }}
|
2017-09-20 18:42:33 -04:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- omega-web/node_modules
|
2018-08-12 21:11:23 -04:00
|
|
|
key: v2-dependencies-web-{{ checksum "omega-web/package.json" }}
|
2017-09-20 18:42:33 -04:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- omega-web/bower_components
|
2018-08-12 21:11:23 -04:00
|
|
|
key: v2-dependencies-webbower-{{ checksum "omega-web/bower.json" }}
|
2017-09-20 18:42:33 -04:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- omega-target-chromium-extension/node_modules
|
2018-08-12 21:11:23 -04:00
|
|
|
key: v2-dependencies-targetchromium-{{ checksum "omega-target-chromium-extension/package.json" }}
|
2017-09-20 18:42:33 -04:00
|
|
|
|
|
|
|
- run: (cd omega-build && sudo npm run dev)
|
|
|
|
- run: (cd omega-pac && npm test)
|
|
|
|
- run: (cd omega-target && npm test)
|
|
|
|
- run: (cd omega-build && grunt)
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Prepare for package builds
|
|
|
|
command: |
|
|
|
|
cd omega-target-chromium-extension
|
|
|
|
mkdir packages
|
2017-09-20 19:44:19 -04:00
|
|
|
base_ver=$(json -f "overlay/manifest.json" version)
|
|
|
|
commit_rev=$(git rev-parse --short HEAD)
|
|
|
|
FULL_VER="${base_ver}-${CIRCLE_BUILD_NUM}.ci.${commit_rev}"
|
|
|
|
echo "export FULL_VER='$FULL_VER'" >> $BASH_ENV
|
2017-09-20 18:42:33 -04:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build unsigned ZIP package for Chromium
|
|
|
|
command: |
|
|
|
|
cd omega-target-chromium-extension
|
|
|
|
grunt release
|
2017-09-20 19:18:42 -04:00
|
|
|
dest_file="packages/SwitchyOmega_${FULL_VER}_Chromium_UNSIGNED.zip"
|
|
|
|
mv release.zip "$dest_file"
|
2017-09-20 18:42:33 -04:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
- run: (cd omega-target-chromium-extension && web-ext -s build lint)
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build unsigned ZIP package for Firefox
|
|
|
|
command: |
|
|
|
|
cd omega-target-chromium-extension
|
|
|
|
web-ext -s build build
|
2017-09-20 20:05:04 -04:00
|
|
|
dest_file="packages/SwitchyOmega_${FULL_VER}_Firefox_UNSIGNED.xpi"
|
2017-09-20 18:42:33 -04:00
|
|
|
mv web-ext-artifacts/*.zip "$dest_file"
|
|
|
|
cd ..
|
|
|
|
- store_artifacts:
|
|
|
|
path: omega-target-chromium-extension/packages
|
|
|
|
destination: packages
|