Skip to content

Commit

Permalink
added support for crate files for crate.io (#1605)
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Gupta <[email protected]>
  • Loading branch information
abhinavGupta16 authored Feb 9, 2022
1 parent 0a20ec1 commit 98fd3b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sign_workflow/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


class Signer:
ACCEPTED_FILE_TYPES = [".zip", ".jar", ".war", ".pom", ".module", ".tar.gz", ".whl"]
ACCEPTED_FILE_TYPES = [".zip", ".jar", ".war", ".pom", ".module", ".tar.gz", ".whl", ".crate"]

def __init__(self):
self.git_repo = GitRepository(self.get_repo_url(), "HEAD", working_subdirectory="src")
Expand Down
4 changes: 3 additions & 1 deletion tests/tests_sign_workflow/test_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_accepted_file_types_sig(self, git_repo):
"the-tar.tar.gz",
"random-file.txt",
"something-1.0.0.0.jar",
"opensearch_sql_cli-1.0.0-py3-none-any.whl"
"opensearch_sql_cli-1.0.0-py3-none-any.whl",
"cratefile.crate"
]
expected = [
call(os.path.join("path", "the-jar.jar"), ".sig"),
Expand All @@ -56,6 +57,7 @@ def test_accepted_file_types_sig(self, git_repo):
call(os.path.join("path", "the-tar.tar.gz"), ".sig"),
call(os.path.join("path", "something-1.0.0.0.jar"), ".sig"),
call(os.path.join("path", "opensearch_sql_cli-1.0.0-py3-none-any.whl"), ".sig"),
call(os.path.join("path", "cratefile.crate"), ".sig")
]
signer = Signer()
signer.sign = MagicMock()
Expand Down

0 comments on commit 98fd3b7

Please sign in to comment.