Skip to content

Commit

Permalink
fix(build): refactor deploy and update package.jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
cal-smith committed Mar 25, 2019
1 parent d6005ed commit 07ae6ef
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 81 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ dist: trusty
language: node_js
node_js:
- '8'
# addons:
# chrome: stable
# before_install:
# - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
before_install: .travis/before_install.sh
install:
- npm install
after_success: .travis/after_success.sh
# script: lerna run lint && lerna run test
after_success: "npm run build-all"
script: lerna run lint
sudo: false
deploy:
-
provider: script
script: "bash ./scripts/deploy.sh"
skip_cleanup: true
true:
branch: master
-
allow-empty-commit: true
email: carbon@us.ibm.com
Expand Down
37 changes: 0 additions & 37 deletions .travis/after_success.sh

This file was deleted.

9 changes: 3 additions & 6 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/bash
set -e
#!/bin/bash
#!/usr/bin/env bash

# Note: do not do set -x or the passwords will leak!
set -e

# @angular/cli should be removed when the angular dmeo project has been removed
npm install -g lerna@3.2.1 @storybook/cli @angular/cli rollup@0.67.3
npm install -g lerna@3.2.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "Apache-2.0",
"scripts": {
"postinstall": "lerna bootstrap --hoist --no-ci",
"clean": "lerna clean",
"clean": "lerna clean && lerna run clean && rm -rf node_modules",
"commit": "git-cz",
"test": "lerna run test",
"lint": "lerna run lint",
Expand Down
5 changes: 3 additions & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"build": "ng-packagr -p package.json",
"storybook": "start-storybook -p 9005 -c .storybook -s ./.storybook/assets",
"demo:build": "build-storybook -o demo/bundle/angular"
"demo:build": "build-storybook -o demo/bundle/angular",
"clean": "rm -rf dist demo/bundle"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,7 +37,7 @@
"@angular/platform-browser": "6.1.0",
"@angular/platform-browser-dynamic": "6.1.0",
"@babel/core": "7.3.4",
"@storybook/angular": "5.0.3",
"@storybook/angular": "5.0.5",
"@types/node": "8.5.2",
"babel-loader": "8.0.5",
"core-js": "2.6.5",
Expand Down
9 changes: 2 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
"name": "@carbon/charts",
"version": "0.11.0",
"description": "Carbon charting components",
"files": [
"dist",
"index.js",
"CHANGELOG.md",
"README.md"
],
"scripts": {
"demo:server": "webpack-dev-server --config webpack.config.js --watch",
"demo:build": "webpack --config webpack.config.js && typedoc --out ./demo/bundle/documentation ./src/index.ts",
Expand All @@ -16,7 +10,8 @@
"bundle:analyzer": "rm -rf dist && webpack --config webpack.build.js --env.bundleAnalyzer",
"lint": "tslint -p tsconfig.json -c tslint.json",
"test": "karma start --single-run",
"test:watch": "karma start --no-single-run"
"test:watch": "karma start --no-single-run",
"clean": "rm -rf dist demo/bundle"
},
"repository": {
"type": "git",
Expand Down
15 changes: 5 additions & 10 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
"version": "0.11.2",
"description": "Carbon charting components for React",
"main": "index.js",
"files": [
"bundle",
"index.js",
"CHANGELOG.md",
"README.md"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run storybook",
"build": "bash build.sh",
"storybook": "start-storybook -p 9006 -c .storybook -s ./assets",
"demo:build": "build-storybook -o demo/bundle/react"
"demo:build": "build-storybook -o demo/bundle/react",
"clean": "rm -rf dist demo/bundle"
},
"repository": {
"type": "git",
Expand All @@ -34,9 +29,9 @@
"react-dom": "^16.6.3"
},
"devDependencies": {
"@storybook/addon-options": "4.0.7",
"@storybook/react": "4.0.7",
"@storybook/storybook-deployer": "2.3.0",
"@storybook/addon-options": "5.0.5",
"@storybook/react": "5.0.5",
"@storybook/storybook-deployer": "2.8.1",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-loader": "7.1.2",
Expand Down
18 changes: 6 additions & 12 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,26 @@
"version": "0.11.3",
"description": "Carbon charting components for Vue",
"main": "index.js",
"files": [
"charts-vue.common.js",
"charts-vue.umd.js",
"charts-vue.umd.min.js",
"CHANGELOG.md",
"README.md"
],
"scripts": {
"build": "bash build.sh",
"lint": "vue-cli-service lint ./src/index.js",
"storybook": "start-storybook -p 6006",
"demo:build": "build-storybook -o demo/bundle/vue",
"ci-check": "yarn format:diff",
"format": "prettier --write \"**/*.{scss,css,js,md,vue}\"",
"format:diff": "prettier --list-different \"**/*.{scss,css,js,md,vue}\""
"format:diff": "prettier --list-different \"**/*.{scss,css,js,md,vue}\"",
"clean": "rm -rf dist demo/bundle"
},
"dependencies": {
"@carbon/charts": "^0.11.0",
"vue": "2.5.21"
},
"devDependencies": {
"@babel/core": "7.3.4",
"@storybook/addon-actions": "4.0.7",
"@storybook/addon-links": "4.0.7",
"@storybook/addons": "4.0.7",
"@storybook/vue": "4.0.7",
"@storybook/addon-actions": "5.0.5",
"@storybook/addon-links": "5.0.5",
"@storybook/addons": "5.0.5",
"@storybook/vue": "5.0.5",
"@vue/cli-plugin-babel": "3.4.0",
"@vue/cli-plugin-eslint": "3.4.0",
"@vue/cli-service": "3.4.0",
Expand Down
11 changes: 11 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e # exit with nonzero exit code if anything fails

npm run build-all

# Should remove once lerna stops mistakenly
# adding package-lock.json to every package after npm install
rm -rf **/package-lock.json

lerna publish --conventional-commits --yes --github-release --contents dist

0 comments on commit 07ae6ef

Please # to comment.