Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 625b97f

Browse files
committedAug 26, 2019
cleans up circleci validation with script
1 parent c3737e5 commit 625b97f

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed
 

‎.buildscript/circle.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if ! eMSG=$(circleci config validate -c .circleci/config.yml); then
4+
echo "CircleCI Configuration Failed Validation."
5+
echo $eMSG
6+
exit 1
7+
fi

‎.circleci/config.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
workflows:
22
version: 2
3+
validate-config:
4+
jobs:
5+
- yarn run circle-lint
36
multi-test:
47
jobs:
58
- test-node8
@@ -49,17 +52,6 @@ workflows:
4952

5053
version: 2
5154
jobs:
52-
validate-config:
53-
docker:
54-
- image: node
55-
steps:
56-
- run:
57-
- >
58-
if ! eMSG=$(circleci config validate -c .circleci/config.yml); then
59-
echo "CircleCI Configuration Failed Validation."
60-
echo $eMSG
61-
exit 1
62-
fi
6355
node-base-test: &node-base-test
6456
working_directory: ~/analytics-node
6557
docker:

‎.huskyrc.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ module.exports = {
33
'hooks': {
44
'pre-commit': tasks([
55
'exec < /dev/tty',
6-
`if ! [ -x "$(command -v circleci2)" ]; then
6+
`if ! [ -x "$(command -v circleci)" ]; then
77
echo "If you want to verify your circleci config precommit, please install the local circleci tool from https://circleci.com/docs/2.0/local-cli/"; else
8-
if ! eMSG=$(circleci config validate -c .circleci/config.yml); then
9-
echo "CircleCI Configuration Failed Validation."
10-
echo $eMSG
11-
exit 1
12-
fi
8+
yarn run circle-lint
139
fi`
1410
])
1511
}

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
}
2020
],
2121
"scripts": {
22+
"circle-lint": ".buildscript/circle.sh",
2223
"dependencies": "yarn",
2324
"size": "size-limit",
2425
"test": "standard && nyc ava && .buildscript/e2e.sh",
@@ -42,7 +43,6 @@
4243
"@segment/loosely-validate-event": "^2.0.0",
4344
"axios": "^0.19.0",
4445
"axios-retry": "^3.0.2",
45-
"husky": "^3.0.4",
4646
"lodash.isstring": "^4.0.1",
4747
"md5": "^2.2.1",
4848
"ms": "^2.0.0",
@@ -57,6 +57,7 @@
5757
"commander": "^2.9.0",
5858
"delay": "^4.2.0",
5959
"express": "^4.15.2",
60+
"husky": "^3.0.4",
6061
"nyc": "^14.1.1",
6162
"pify": "^4.0.1",
6263
"sinon": "^7.3.2",

0 commit comments

Comments
 (0)
This repository has been archived.