AWS CodeBuild integration

How to integrate SimpleLocalize with CodeBuild

To integrate SimpleLocalize with CodeBuild service simply put bash script in command list:

curl -s https://get.simplelocalize.io | bash

The best place to run SimpleLocalize script is after successful build because this won't result weird internationalisation keys caused by invalid syntax.

Example buildspec.yml

version: 0.1
phases:
install:
commands:
- curl -sL https://deb.nodesource.com/setup_7.x | bash -
- apt-get install -y nodejs
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
- apt-get update
- apt-get install -y yarn
pre_build:
commands:
- yarn install
build:
commands:
- yarn run unit-test
- yarn run it-test
- yarn run build-css
- yarn run build-app
# Run SimpleLocalize after running yarn install
- curl -s https://get.simplelocalize.io | bash
artifacts:
type: zip
files:
- '**/*'
base-directory: 'build*'
cache:
paths:
- 'node_modules/**/*'