1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Split Codeship scripts up and install Yarn

This commit is contained in:
Daniel Barber 2018-02-23 11:50:36 -05:00
parent 7f754af252
commit 704b1b74ae
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
4 changed files with 26 additions and 18 deletions

7
bin/codeship_assets Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
echo "Building assets"
cd assets
yarn install
yarn run build
cd ..

5
bin/codeship_db Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
echo "Creating and migrating database"
mix ecto.create
mix ecto.migrate

14
bin/codeship_deps Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
echo "Installing Yarn"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
echo "Installing Phoenix dependencies"
mix local.hex --force
mix local.rebar --force
export MIX_ENV=test
mix deps.get
mix deps.compile

View File

@ -11,21 +11,3 @@ curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/pha
echo "Installing NodeJS"
nvm install $NODE_VERSION
echo "Installing Phoenix dependencies"
mix local.hex --force
mix local.rebar --force
export MIX_ENV=test
mix deps.get
mix deps.compile
echo "Creating and migrating database"
mix ecto.create
mix ecto.migrate
echo "Building assets"
cd assets
npm install
npm run build
cd ..