mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 20:59:08 +02:00
ff354cc5b8
* GitHub actions uses locked install for CI * Add initial GitHub action to publish to NPM * Detect the NPM tag (latest vs next) depending on the git tag * Deploy docs from releases & master commits * Remove Travis CI * Update repo badge to use actions status * Remove Travis env vars and update docs-config to take a parameter * Update publish script regex to match other scripts * Deploy docs action only runs in one spot
23 lines
415 B
Bash
Executable File
23 lines
415 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
VERSION=$1
|
|
|
|
# Note: this code also exists in deploy.sh
|
|
# tag is next|latest|master
|
|
# https://www.chartjs.org/docs/$tag/
|
|
function update_config {
|
|
local tag=''
|
|
if [ "$VERSION" == "master" ]; then
|
|
tag=master
|
|
elif [[ "$VERSION" =~ ^[^-]+$ ]]; then
|
|
tag=latest
|
|
else
|
|
tag=next
|
|
fi
|
|
sed -i -e "s/VERSION/$tag/g" "docs/docusaurus.config.js"
|
|
}
|
|
|
|
update_config
|