Skip to content

Disable publishing flavors e.g. plotly-rc-v2 to CDN #5470

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 1 commit into from
Feb 4, 2021
Merged
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
9 changes: 7 additions & 2 deletions tasks/cdn_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ version=$(node -e "console.log(require('./package.json').version);")
major=$(node -e "console.log(require('./package.json').version.split('.')[0]);")

# read tag either latest or rc
tag=$(node -e "var rc = require('./package.json').version.split('-')[1]; console.log(rc ? rc.split('.')[0] : 'latest');")
baseTag=$(node -e "var rc = require('./package.json').version.split('-')[1]; console.log(rc ? rc.split('.')[0] : 'latest');")

# if not v1 add major version to the tag e.g. latest-v2
tag=$baseTag
if [ $major -ne 1 ]; then tag=$tag-v$major; fi
echo $tag

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

cp $path "$sync/${name}-${version}.$ext"
cp $path "$sync/${name}-${tag}.$ext"

if [ $baseTag = "latest" ]; then
cp $path "$sync/${name}-${tag}.$ext"
fi
done

# copy topojson files over to the sync folder
Expand Down