Skip to content

Commit

Permalink
fixup revision
Browse files Browse the repository at this point in the history
  • Loading branch information
zougloub committed Jul 1, 2020
1 parent 1307011 commit be78305
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions distriploy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def main(args_in=None):

release_meta = release(args.repository, args.revision, config)

mirror_metas = mirror(args.repository, args.revision, config, release_meta)
mirror_metas = mirror(args.repository, config, release_meta)

postrelease_meta = postrelease(args.repository, args.revision, config, release_meta, mirror_metas)
postrelease_meta = postrelease(args.repository, config, release_meta, mirror_metas)


if __name__ == "__main__":
Expand Down
6 changes: 3 additions & 3 deletions distriploy/distriploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def release(repo_path, revision, config):
raise


def mirror(repo_path, revision, config, release_meta):
def mirror(repo_path, config, release_meta):
"""
Handle mirroring of a release.
"""
Expand All @@ -58,7 +58,7 @@ def mirror(repo_path, revision, config, release_meta):
continue

try:
mirror_meta = mod.mirror(repo_path, revision, info, release_meta)
mirror_meta = mod.mirror(repo_path, info, release_meta)
mirror_metas[mirror] = mirror_meta
except Exception as e:
logger.exception("Error running %s: %s", mirror_method_name, e)
Expand All @@ -67,7 +67,7 @@ def mirror(repo_path, revision, config, release_meta):
return mirror_metas


def postrelease(repo_path, revision, config, release_meta, mirror_metas):
def postrelease(repo_path, config, release_meta, mirror_metas):
"""
"""
postrelease_meta = dict()
Expand Down
4 changes: 2 additions & 2 deletions distriploy/mirror_academictorrents.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
logger = logging.getLogger(__name__)


def mirror(repo_path, revision, config, release_meta):
def mirror(repo_path, config, release_meta):
"""
"""

Expand Down Expand Up @@ -43,7 +43,7 @@ def mirror(repo_path, revision, config, release_meta):
b64_torrent = base64.b64encode(data).decode()

post_params = config["params"].copy()
post_params["name"] = "{} (revision: {})".format(post_params["name"], revision)
post_params["name"] = "{} (revision: {})".format(post_params["name"], release_meta["revision"])
post_params["uid"] = username
post_params["pass"] = password
post_params["file"] = b64_torrent
Expand Down
2 changes: 1 addition & 1 deletion distriploy/mirror_osf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .osf import *


def mirror(repo_path, revision, config, release_meta):
def mirror(repo_path, config, release_meta):
"""
"""
ret = dict()
Expand Down
2 changes: 1 addition & 1 deletion distriploy/mirror_rsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
logger = logging.getLogger(__name__)


def mirror(repo_path, revision, config, release_meta):
def mirror(repo_path, config, release_meta):
"""
"""

Expand Down
1 change: 1 addition & 0 deletions distriploy/release_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def release(repo_path, revision, cfg_root) -> dict:

ret["release_id"] = release_id

ret["revision"] = git_tag

tmpdir = "."
local_path = download_default_release_asset(github_repo, release_id, github_token, tmpdir)
Expand Down

0 comments on commit be78305

Please sign in to comment.