Skip to content

Commit

Permalink
Fix for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Arilas committed Oct 30, 2018
1 parent 505daf5 commit 924c093
Show file tree
Hide file tree
Showing 4 changed files with 799 additions and 39 deletions.
78 changes: 41 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
version: 2
shared: &shared
working_directory: ~/repo

Expand Down Expand Up @@ -78,33 +78,38 @@ jobs:
MYSQL_USER: local
MYSQL_PASSWORD: freeware
MYSQL_RANDOM_ROOT_PASSWORD: yes
version:
version-1:
docker:
- image: circleci/node:10
- image: circleci/node:10
working_directory: ~/repo
parameters:
is_next:
type: boolean
default: no
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- when:
condition: <<parameters.is_next>>
steps:
- run: npm publish --tag next
- unless:
condition: <<parameters.is_next>>
steps:
- run: npm publish

- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
command: yarn install
- run:
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
command: npm publish
version-2:
docker:
- image: circleci/node:10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
command: yarn install
- run:
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
command: npm publish --tag next
workflows:
version: 2
build:
Expand All @@ -113,26 +118,25 @@ workflows:
- node_8
- node_10_mariadb_10-3
- node_10_mysql_8
- version:
requires:
- node_6
- node_8
- node_10_mariadb_10-3
- node_10_mysql_8
- version-1:
filters:
branches:
ignore: /.*/
tags:
only: /^v([0-9]+)\.([0-9]+)\.([0-9]+)$/
- version:
is_next: true
requires:
- node_6
- node_8
- node_10_mariadb_10-3
- node_10_mysql_8
- node_6
- node_8
- node_10_mariadb_10-3
- node_10_mysql_8
- version-2:
filters:
branches:
ignore: /.*/
tags:
only: /^v([0-9]+)\.([0-9]+)\.([0-9]+)-next\.([0-9]+)$/
requires:
- node_6
- node_8
- node_10_mariadb_10-3
- node_10_mysql_8
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.babelrc
coverage
coverage
.circleci
.vscode
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"coverageDirectory": "./coverage/",
"collectCoverage": true,
"testPathIgnorePatterns": [
"<rootDir>[/\\\\](build|docs|node_modules|scripts)[/\\\\]",
"<rootDir>[/\\\\](build|docs|node_modules|scriptslib/)[/\\\\]",
"(config|fixtures|utils)"
],
"testEnvironment": "node",
Expand Down

0 comments on commit 924c093

Please sign in to comment.