Skip to content

Commit 0ea82cf

Browse files
committed
Fixing regex for package deployment.
1 parent e26b437 commit 0ea82cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ general:
2424

2525
deployment:
2626
release:
27-
tag: /(([a-z]+)-)?([0-9]+)\.([0-9]+)\.([0-9]+)/
27+
tag: /(([a-z]+)-)*([0-9]+)\.([0-9]+)\.([0-9]+)/
2828
owner: GoogleCloudPlatform
2929
commands:
3030
- pip install --upgrade twine

scripts/circleci_tagged_pkg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import sys
2525

2626

27-
RE_TXT = r'^((?P<pkg>[a-z]+)-)?([0-9]+)\.([0-9]+)\.([0-9]+)$'
27+
RE_TXT = r'^(?P<pkg>(([a-z]+)-)*)([0-9]+)\.([0-9]+)\.([0-9]+)$'
2828
TAG_RE = re.compile(RE_TXT)
2929
TAG_ENV = 'CIRCLE_TAG'
3030
ERROR_MSG = '%s env. var. not set' % (TAG_ENV,)
@@ -52,7 +52,7 @@ def main():
5252
if pkg_name is None:
5353
print(ROOT_DIR)
5454
else:
55-
pkg_dir = pkg_name.replace('-', '_')
55+
pkg_dir = pkg_name.rstrip('-').replace('-', '_')
5656
print(os.path.join(ROOT_DIR, pkg_dir))
5757

5858

0 commit comments

Comments
 (0)