Skip to content

Commit a315ea0

Browse files
Arthur AgombartArthur Agombart
authored andcommitted
chore(ci): update lockfile as needed
1 parent 8b03267 commit a315ea0

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.circleci/commit-lockfile.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ PROJECT_LOCKFILE=${PROJECT_LOCKFILE:-"package-lock.json"}
44
GITHUB_EMAIL=${GITHUB_EMAIL:-"task-runner@circleci"}
55
GITHUB_NAME=${GITHUB_NAME:-"Circle CI<$GITHUB_EMAIL>"}
66

7-
# if [[ $TRAVIS_PULL_REQUEST_BRANCH != *"greenkeeper"* ]]; then
8-
# exit 0
9-
# fi
7+
if [[ $CIRCLE_BRANCH != *"greenkeeper"* ]]; then
8+
exit 0
9+
fi
1010

11-
echo "" >> $PROJECT_LOCKFILE
12-
# if ! git diff-index --quiet HEAD $PROJECT_LOCKFILE --; then
11+
if ! git diff-index --quiet HEAD $PROJECT_LOCKFILE --; then
1312
git config user.email $GITHUB_EMAIL
1413
git config user.name $GITHUB_NAME
1514

1615
git add $PROJECT_LOCKFILE
1716
git commit -m "chore(*): update lockfile [ci skip]" -m "See: $CIRCLE_BUILD_URL"
1817
git push origin $CIRCLE_BRANCH
19-
# fi
18+
fi

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
- node_modules
2727
key: dependencies-{{ checksum "package.json" }}
2828

29-
- run:
30-
name: Custom task
31-
command: .circleci/commit-lockfile.sh
32-
3329
- run:
3430
name: Executing tests
3531
command: npm test
3632

33+
- run:
34+
name: Update Lockfile
35+
command: .circleci/commit-lockfile.sh
36+
3737

0 commit comments

Comments
 (0)