Skip to content

Commit b71e70e

Browse files
authored
Merge pull request #5470 from plotly/dont-publish-rc-v2-for-now
Disable publishing flavors e.g. plotly-rc-v2 to CDN
2 parents b749ced + 595fcd3 commit b71e70e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tasks/cdn_publish.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ version=$(node -e "console.log(require('./package.json').version);")
1111
major=$(node -e "console.log(require('./package.json').version.split('.')[0]);")
1212

1313
# read tag either latest or rc
14-
tag=$(node -e "var rc = require('./package.json').version.split('-')[1]; console.log(rc ? rc.split('.')[0] : 'latest');")
14+
baseTag=$(node -e "var rc = require('./package.json').version.split('-')[1]; console.log(rc ? rc.split('.')[0] : 'latest');")
15+
1516
# if not v1 add major version to the tag e.g. latest-v2
17+
tag=$baseTag
1618
if [ $major -ne 1 ]; then tag=$tag-v$major; fi
1719
echo $tag
1820

@@ -34,7 +36,10 @@ for path in `ls $dist/plotly*`; do
3436
fi
3537

3638
cp $path "$sync/${name}-${version}.$ext"
37-
cp $path "$sync/${name}-${tag}.$ext"
39+
40+
if [ $baseTag = "latest" ]; then
41+
cp $path "$sync/${name}-${tag}.$ext"
42+
fi
3843
done
3944

4045
# copy topojson files over to the sync folder

0 commit comments

Comments
 (0)