Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
Remove sync from github subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
SanmerDev committed Sep 5, 2023
1 parent 0374deb commit cd382b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 42 deletions.
33 changes: 6 additions & 27 deletions sync/cli/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,33 +225,12 @@ def github(cls) -> int:
after_date=parse(cls._args.after_date).date()
)

if cls._args.update:
sync = Sync(
root_folder=root_folder,
config=config,
tracks=tracks
)
sync.update(
module_ids=cls._args.repo_names,
force=False,
user_name=cls._args.user_name,
cover=cls._args.cover,
use_ssh=cls._args.ssh
)

index = Index(root_folder=root_folder, config=config)
index(version=cls._args.index_version, to_file=True)

if cls._args.push:
sync.push_by_git(cls._args.git_branch)

else:
tracks.get_tracks(
user_name=cls._args.user_name,
repo_names=cls._args.repo_names,
cover=cls._args.cover,
use_ssh=cls._args.ssh
)
tracks.get_tracks(
user_name=cls._args.user_name,
repo_names=cls._args.repo_names,
cover=cls._args.cover,
use_ssh=cls._args.ssh
)

if cls._args.clear:
tracks.clear_tracks()
Expand Down
15 changes: 0 additions & 15 deletions sync/cli/Parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,6 @@ def configure_parser_github(cls, sub_parsers):
default=None,
help="Names of repository, default is all."
)
p.add_argument(
"-v",
"--version",
dest="index_version",
metavar="VERSION",
type=int,
default=Index.latest_version,
help="Version of the index file ({0}), default: {1}.".format(ModulesJson.filename(), "%(default)s")
)
p.add_argument(
"-d",
"--date",
Expand All @@ -267,18 +258,12 @@ def configure_parser_github(cls, sub_parsers):
action="store_true",
help="Overwrite fields of tracks (exclude 'added')."
)
p.add_argument(
"--update",
action="store_true",
help="Update modules to the latest version."
)
p.add_argument(
"--clear",
action="store_true",
help="Remove tracks, exclude those in the current session."
)

cls.add_parser_git(p)
env = cls.add_parser_env(p, add_quiet=True)
env.add_argument(
"--api-token",
Expand Down

0 comments on commit cd382b8

Please sign in to comment.