Prepare for the v1.0.0-beta.1 release. (#3079)
- Update scripts/get-version and friends to understand the new -alpha and -beta tags - Update the CHANGELOG
This commit is contained in:
parent
1a698cbc9e
commit
57b6e84645
|
@ -1,7 +1,7 @@
|
|||
CHANGELOG
|
||||
=========
|
||||
|
||||
## Unreleased
|
||||
## 1.0.0-beta.1 (2019-08-13)
|
||||
|
||||
- Do not propagate input properties to missing output properties during preview. The old behavior can cause issues that
|
||||
are difficult to diagnose in cases where the actual value of the output property differs from the value of the input
|
||||
|
|
|
@ -29,6 +29,10 @@ var (
|
|||
`^v(?P<version>\d+\.\d+\.\d+)(?P<dirty>\+dirty)?$`)
|
||||
rcVersionRegex = regexp.MustCompile(
|
||||
`^v(?P<version>\d+\.\d+\.\d+)-rc\.(?P<rcN>\d+)(?P<dirty>\+dirty)?$`)
|
||||
betaVersionRegex = regexp.MustCompile(
|
||||
`^v(?P<version>\d+\.\d+\.\d+)-beta\.(?P<betaN>\d+)(?P<dirty>.dirty)?$`)
|
||||
alphaVersionRegex = regexp.MustCompile(
|
||||
`^v(?P<version>\d+\.\d+\.\d+)-alpha\.(?P<time>\d+)\+(?P<gitInfo>g[a-z0-9]+)(?P<dirty>.dirty)?$`)
|
||||
devVersionRegex = regexp.MustCompile(
|
||||
`^v(?P<version>\d+\.\d+\.\d+)-dev\.(?P<time>\d+)\+(?P<gitInfo>g[a-z0-9]+)(?P<dirty>.dirty)?$`)
|
||||
)
|
||||
|
@ -42,21 +46,36 @@ var (
|
|||
func PyPiVersionFromNpmVersion(s string) (string, error) {
|
||||
var b bytes.Buffer
|
||||
|
||||
if releaseVersionRegex.MatchString(s) {
|
||||
switch {
|
||||
case releaseVersionRegex.MatchString(s):
|
||||
capMap := captureToMap(releaseVersionRegex, s)
|
||||
mustFprintf(&b, "%s", capMap["version"])
|
||||
if capMap["dirty"] != "" {
|
||||
mustFprintf(&b, "+dirty")
|
||||
}
|
||||
return b.String(), nil
|
||||
} else if rcVersionRegex.MatchString(s) {
|
||||
case rcVersionRegex.MatchString(s):
|
||||
capMap := captureToMap(rcVersionRegex, s)
|
||||
mustFprintf(&b, "%src%s", capMap["version"], capMap["rcN"])
|
||||
if capMap["dirty"] != "" {
|
||||
mustFprintf(&b, "+dirty")
|
||||
}
|
||||
return b.String(), nil
|
||||
} else if devVersionRegex.MatchString(s) {
|
||||
case betaVersionRegex.MatchString(s):
|
||||
capMap := captureToMap(betaVersionRegex, s)
|
||||
mustFprintf(&b, "%sb%s", capMap["version"], capMap["betaN"])
|
||||
if capMap["dirty"] != "" {
|
||||
mustFprintf(&b, "+dirty")
|
||||
}
|
||||
return b.String(), nil
|
||||
case alphaVersionRegex.MatchString(s):
|
||||
capMap := captureToMap(alphaVersionRegex, s)
|
||||
mustFprintf(&b, "%sa%s", capMap["version"], capMap["time"])
|
||||
if capMap["dirty"] != "" {
|
||||
mustFprintf(&b, "+dirty")
|
||||
}
|
||||
return b.String(), nil
|
||||
case devVersionRegex.MatchString(s):
|
||||
capMap := captureToMap(devVersionRegex, s)
|
||||
mustFprintf(&b, "%s.dev%s", capMap["version"], capMap["time"])
|
||||
if capMap["dirty"] != "" {
|
||||
|
|
|
@ -43,7 +43,7 @@ PATCH=$(cut -d. -f3 <<< "${TAG}")
|
|||
# add a timestamp and commit hash. We use the timestamp of the commit
|
||||
# itself, not the date it was authored (so it will change when someone
|
||||
# rebases a PR into master, for example).
|
||||
echo -n "${MAJOR}.${MINOR}.$((${PATCH}+1))-dev.$(git show -s --format='%ct+g%h' ${COMMITISH})"
|
||||
echo -n "${MAJOR}.${MINOR}.$((${PATCH}+1))-alpha.$(git show -s --format='%ct+g%h' ${COMMITISH})"
|
||||
if [ ! -z "${DIRTY_TAG}" ]; then
|
||||
echo -n ".${DIRTY_TAG}"
|
||||
fi
|
||||
|
|
|
@ -16,10 +16,10 @@ if [[ "${TRAVIS_PUBLISH_PACKAGES:-}" == "true" ]]; then
|
|||
NPM_TAG=$(echo "${TRAVIS_BRANCH}" | sed -e 's|^features/|feature-|g')
|
||||
fi
|
||||
|
||||
# If the package doesn't have a pre-release tag, use the tag of latest instead of
|
||||
# If the package doesn't have an alpha tag, use the tag of latest instead of
|
||||
# dev. NPM uses this tag as the default version to add, so we want it to mean
|
||||
# the newest released version.
|
||||
if [[ $(jq -r .version < "${ROOT}/sdk/nodejs/bin/package.json") != *-* ]]; then
|
||||
if [[ $(jq -r .version < "${ROOT}/sdk/nodejs/bin/package.json") != *-alpha* ]]; then
|
||||
NPM_TAG="latest"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue