refactor to scripts

This commit is contained in:
Lachlan Kermode
2018-12-14 16:56:37 +00:00
parent 5f4943d1d5
commit 219adc1e5e
4 changed files with 10 additions and 4 deletions

View File

@@ -10,9 +10,7 @@ before_script:
install:
- yarn
script:
- if [ "TRAVIS_PULL_REQUEST" = "false" ]; then bash ./scripts/decrypt.sh; fi
- yarn build
- yarn lint
- yarn test
before_install:
- openssl aes-256-cbc -K $encrypted_4f23b46f1ec6_key -iv $encrypted_4f23b46f1ec6_iv
-in .env.enc -out .env -d

View File

@@ -13,7 +13,7 @@
},
"husky": {
"hooks": {
"pre-commit": "yarn test && yarn lint && travis encrypt-file .env --add --force && git add ."
"pre-push": "yarn test && yarn lint && travis encrypt-file .env --add --force && git add .env.enc && git commit -m \"add encrypted key\""
}
},
"repository": {

2
scripts/decrypt.sh Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
openssl aes-256-cbc -K $encrypted_4f23b46f1ec6_key -iv $encrypted_4f23b46f1ec6_iv -in .env.enc -out .env -d

6
scripts/encrypt.sh Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
yarn test
yarn lint
travis encrypt-file .env --add --force
git add .env.enc
git commit -m "add encrypted private key for travis testing"