Skip to content

Commit 9fcef2b

Browse files
committed
no longer publish/overwrite any latest to CDN after v2
1 parent 4759b7e commit 9fcef2b

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

tasks/cdn_publish.sh

-14
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@ fi
88

99
# get plotly.js version from its package json
1010
version=$(node -e "console.log(require('./package.json').version);")
11-
major=$(node -e "console.log(require('./package.json').version.split('.')[0]);")
12-
13-
# read tag either latest or rc
14-
baseTag=$(node -e "var rc = require('./package.json').version.split('-')[1]; console.log(rc ? rc.split('.')[0] : 'latest');")
15-
16-
# if not v1 add major version to the tag e.g. latest-v2
17-
tag=$baseTag
18-
if [ $major -ne 1 ]; then tag=$tag-v$major; fi
19-
echo $tag
20-
2111
dist=dist
2212
sync=build/sync
2313

@@ -36,10 +26,6 @@ for path in `ls $dist/plotly*`; do
3626
fi
3727

3828
cp $path "$sync/${name}-${version}.$ext"
39-
40-
if [ $baseTag = "latest" ]; then
41-
cp $path "$sync/${name}-${tag}.$ext"
42-
fi
4329
done
4430

4531
# copy topojson files over to the sync folder

tasks/stats.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ var prettySize = require('prettysize');
77
var common = require('./util/common');
88
var constants = require('./util/constants');
99
var pkgVersion = require('../package.json').version;
10-
var majorVersion = pkgVersion.split('.')[0];
11-
var theLatest = 'latest' + (
12-
(majorVersion === '1') ? '' : ('-v' + majorVersion)
13-
);
1410

1511
var pathDistREADME = path.join(constants.pathToDist, 'README.md');
1612
var cdnRoot = 'https://cdn.plot.ly/plotly-';
@@ -81,7 +77,6 @@ function getInfoContent() {
8177
'Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.',
8278
'Many other localizations are available - here is an example using Swiss-German (de-CH),',
8379
'see the contents of this directory for the full list.',
84-
'They are also available on our CDN as ' + cdnRoot + 'locale-de-ch-' + theLatest + '.js OR ' + cdnRoot + 'locale-de-ch-' + pkgVersion + '.js',
8580
'Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.',
8681
'',
8782
'*After* the plotly.js script tag, add:',
@@ -116,12 +111,12 @@ function getMainBundleInfo() {
116111
'',
117112
'It be can imported as minified javascript',
118113
'- using dist file `dist/plotly.min.js`',
119-
'- using CDN URL ' + cdnRoot + theLatest + MINJS + ' OR ' + cdnRoot + pkgVersion + MINJS,
114+
'- using CDN URL ' + cdnRoot + pkgVersion + MINJS,
120115
'',
121116
'or as raw javascript:',
122117
'- using the `plotly.js-dist` npm package (starting in `v1.39.0`)',
123118
'- using dist file `dist/plotly.js`',
124-
'- using CDN URL ' + cdnRoot + theLatest + JS + ' OR ' + cdnRoot + pkgVersion + JS,
119+
'- using CDN URL ' + cdnRoot + pkgVersion + JS,
125120
'- using CommonJS with `require(\'plotly.js\')`',
126121
'',
127122
'If you would like to have access to the attribute meta information ' +
@@ -192,8 +187,6 @@ function makeBundleInfo(pathObj) {
192187
'',
193188
'| Flavor | URL |',
194189
'| ------ | --- |',
195-
'| Latest | ' + cdnRoot + name + '-' + theLatest + JS + ' |',
196-
'| Latest minified | ' + cdnRoot + name + '-' + theLatest + MINJS + ' |',
197190
'| Tagged | ' + cdnRoot + name + '-' + pkgVersion + JS + ' |',
198191
'| Tagged minified | ' + cdnRoot + name + '-' + pkgVersion + MINJS + ' |',
199192
'',

0 commit comments

Comments
 (0)