This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: CIRCLE_TOKEN=x CIRCLE_WATCHER_ORG=y CIRCLE_WATCHER_PROJECT=z python main.py | |
from blink1.blink1 import Blink1 | |
from pycircleci.api import Api, CIRCLE_TOKEN | |
import os | |
import time | |
ORG = os.environ["CIRCLE_WATCHER_ORG"] | |
PROJECT = os.environ["CIRCLE_WATCHER_PROJECT"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import re | |
pattern = "^(.*)(\d+).(\d+).(\d+)(.*)$" | |
def isVersion(arg, pattern=pattern): | |
if not re.match(pattern, arg): | |
raise argparse.ArgumentTypeError("invalid version pattern. Should match: [prefix]x.y.z[suffix]") |