Skip to content

Improve CI publish container #3558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,28 @@ jobs:
- attach_workspace:
at: ~/plotly.js
- run:
name: Update plot-schema.json
command: node tasks/bundle_plot_schema.js
name: Build dist/
command: npm run build
- store_artifacts:
path: build/plotly.js
destination: /plotly.js
- store_artifacts:
path: dist/plotly.min.js
destination: /plotly.min.js
path: dist
destination: dist
- run:
name: Pack tarball
command: |
npm pack
version=$(node -e "console.log(require('./package.json').version)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please apply something like | cut -c1-7 to the result of console.log to reduce the chance of running errors if any?

version=$(node -e "console.log(require('./package.json').version)" | cut -c1-7)

mv plotly.js-$version.tgz plotly.js.tgz
- store_artifacts:
path: dist/plot-schema.json
destination: /plot-schema.json
path: plotly.js.tgz
destination: /plotly.js.tgz
- run:
name: Show URLs to build files
command: |
PROJECT_NUM=45646037
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.min.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plot-schema.json
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/plotly.js.tgz
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json

workflows:
version: 2
Expand Down
19 changes: 0 additions & 19 deletions tasks/bundle_plot_schema.js

This file was deleted.