mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
24 lines
498 B
Bash
24 lines
498 B
Bash
#!/bin/bash
|
|
|
|
# tag is next|latest|master|x.x.x
|
|
# https://www.chartjs.org/dist/$tag/
|
|
# https://www.chartjs.org/docs/$tag/
|
|
# https://www.chartjs.org/samples/$tag/
|
|
function tag_from_version {
|
|
local version=$1
|
|
local mode=$2
|
|
local tag=''
|
|
if [ "$version" == "master" ]; then
|
|
tag=master
|
|
elif [[ "$version" =~ ^[^-]+$ ]]; then
|
|
if [[ "$mode" == "release" ]]; then
|
|
tag=$version
|
|
else
|
|
tag=latest
|
|
fi
|
|
else
|
|
tag=next
|
|
fi
|
|
echo $tag
|
|
}
|