Skip to content

Commit 14ab307

Browse files
authored
Merge pull request #5815 from plotly/label-draft-bundles
Label draft bundles and show package.json diff between versions when publishing dist artifacts on CircleCI
2 parents 01e25e7 + a7dd3e9 commit 14ab307

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.circleci/config.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ jobs:
189189
if [ $CIRCLE_BRANCH == "master" ]
190190
then npm run use-draftlogs && git --no-pager diff --color-words CHANGELOG.md || true
191191
fi
192+
- run:
193+
name: Set draft version in package.json
194+
command: |
195+
node --eval "var fs = require('fs'); var inOut = './package.json'; var data = JSON.parse(fs.readFileSync(inOut)); var a = process.argv; data.version = a[a.length - 1].replace('v', ''); fs.writeFileSync(inOut, JSON.stringify(data, null, 2) + '\n');" `git describe`
196+
- run:
197+
name: View package.json diff between previous and next releases (including above draft version change)
198+
command: git --no-pager diff --color-words tags/$(git describe --tags --abbrev=0) package.json || true
192199
- run:
193200
name: Build dist/
194201
command: npm run build
@@ -205,7 +212,7 @@ jobs:
205212
name: Pack tarball
206213
command: |
207214
npm pack
208-
version=$(node -e "console.log(require('./package.json').version)")
215+
version=$(node --eval "console.log(require('./package.json').version)")
209216
mv plotly.js-$version.tgz plotly.js.tgz
210217
- store_artifacts:
211218
path: plotly.js.tgz

draftlogs/5815_change.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Label draft bundles and show package.json diff between versions when publishing dist artifacts on CircleCI [[#5815](https://github.com/plotly/plotly.js/pull/5815)]

0 commit comments

Comments
 (0)