k3s/hack/lib
Kubernetes Submit Queue 658ca939fd
Merge pull request #57420 from rphillips/fixes/semver_metadata
Automatic merge from submit-queue (batch tested with PRs 58375, 58306, 58386, 57420, 58035). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add semver metadata regex

**What this PR does / why we need it**: When building a release tag with optional semver metadata, the minor and major versions are not parsed correctly (empty strings). This fix adds optional support to the regex for the metadata component.

example:

```
~/w/g/s/k/kubernetes ❯❯❯ git tag v1.9.0+stable.0                                 fixes/semver_metadata ✭
~/w/g/s/k/kubernetes ❯❯❯ hack/print-workspace-status.sh                          fixes/semver_metadata ✭
STABLE_BUILD_GIT_COMMIT 63e2eacd22
STABLE_BUILD_SCM_STATUS clean
STABLE_BUILD_SCM_REVISION v1.9.0+stable.0
STABLE_BUILD_MAJOR_VERSION 1
STABLE_BUILD_MINOR_VERSION 9
STABLE_DOCKER_TAG v1.9.0_stable.0
gitCommit 63e2eacd22
gitTreeState clean
gitVersion v1.9.0+stable.0
gitMajor 1
gitMinor 9
buildDate 2017-12-19T21:08:48Z
```

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-01-17 13:08:35 -08:00
..
.gitattributes Capture git export-subst strings in version.sh for 'git archive' use. 2017-11-09 16:36:27 -08:00
BUILD cluster: move logging library to hack/ 2018-01-13 16:37:50 -08:00
etcd.sh hack/update-swagger-spec.sh(cleanup): fix signal handler to really cleanup etcd and minor improvements. 2018-01-17 09:58:57 +01:00
golang.sh Fix comparison of golang versions 2018-01-15 17:26:34 +01:00
init.sh cluster: move logging library to hack/ 2018-01-13 16:37:50 -08:00
logging.sh cluster: move logging library to hack/ 2018-01-13 16:37:50 -08:00
protoc.sh Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
swagger.sh Revert k8s.gcr.io vanity domain 2017-12-22 14:36:16 -08:00
test.sh Avoid error on closed pipe 2018-01-03 16:44:50 -05:00
util.sh Revert "Rewrite go_install_from_commit to handle pkgs that aren't in HEAD" 2018-01-12 12:27:49 -08:00
version.sh add semver metadata regex 2017-12-19 15:04:56 -06:00