Skip to content

Commit

Permalink
Merge pull request #3 from cgalibern/fix-import-runner-failure
Browse files Browse the repository at this point in the history
fix-import-runner-failure
  • Loading branch information
cgalibern authored Sep 14, 2021
2 parents bff79e7 + f3abf58 commit e5c4543
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion extra_lib_examples/runner/release_example.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
import os

from runner.release import Runner as ReleaseRunner


class Runner(ReleaseRunner):
def extra_action(self, job):
return " current link updated:..."
"""
update symlink <api_version>/current -> <tag>/bundle
"""
release_dir = self.release_dir(job)
version_dir = os.path.dirname(release_dir)
current = os.path.join(version_dir, "current")
bundle = os.path.join(os.path.basename(release_dir), 'bundle')
try:
os.unlink(current)
except:
# ignore broken link
pass
os.symlink(bundle, current)
return f"current {current} is now {bundle}"

def release_dir(self, job):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@dataclass(order=True)
class Job:
runner_lib: str = 'null_runner'
runner_lib: str = 'null'
context: ContextAbstract = field(default_factory=ContextAbstract)
runner = None

Expand Down
File renamed without changes.

0 comments on commit e5c4543

Please sign in to comment.