diff --git a/CHANGELOG.md b/CHANGELOG.md index e8e3c93a1e812e19d4f3324e4c458476470bacb4..b63f2dd49f677c81b33a078530b1d8d90eb9b225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##[Unreleased] +## [2.0.3] - 2019-08-27 +### Fixed +- Appending to list incorrectly, creating two lists `[[]]`. + ## [2.0.3] - 2019-08-27 ### Fixed - Error typo `artifacts` should've been `artifact` in for loop. diff --git a/docs/source/conf.py b/docs/source/conf.py index f6b1a9803b01231802c5f82e800aa8a26655b091..b7f52398b92402c85b2a4e81be02556717b59e4b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ copyright = "2019, Haseeb Majid" author = "Haseeb Majid" # The full version, including alpha/beta/rc tags -release = "2.0.3" +release = "2.0.4" # -- General configuration --------------------------------------------------- diff --git a/setup.cfg b/setup.cfg index 963f97fe05a54b765b86c83bc855e02c4172f6ea..982d81ac32d5da756531e4948057f8557bd3227d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.0.3 +current_version = 2.0.4 commit = False tag = False diff --git a/setup.py b/setup.py index 0256dbaa90abb67240d180fe9818d8f708a51aa5..43bcc0779530f05b6cde5a9e1af96640eb3af4fc 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup( name="gitlab-auto-release", - version="2.0.3", + version="2.0.4", description="Python script which is used to create releases on GitLab", long_description=open("README.rst").read(), long_description_content_type="text/x-rst", diff --git a/src/gitlab_auto_release/cli.py b/src/gitlab_auto_release/cli.py index 9782ec2375b4ade37cea089189f9e24b7b11e8e4..b92dd56d5b1d0e16fa242a515735088c474c06ef 100644 --- a/src/gitlab_auto_release/cli.py +++ b/src/gitlab_auto_release/cli.py @@ -53,7 +53,6 @@ import gitlab ) def cli(private_token, project_id, project_url, tag_name, release_name, changelog, description, asset, artifacts): """Gitlab Auto Release Tool.""" - print(artifacts) gitlab_url = re.search("^https?://[^/]+", project_url).group(0) gl = gitlab.Gitlab(gitlab_url, private_token=private_token) try: @@ -75,7 +74,7 @@ def cli(private_token, project_id, project_url, tag_name, release_name, changelo try: artifacts = add_artifacts(project, project_url, artifacts) - assets.append(artifacts) + assets += artifacts except IndexError: print(f"One of the jobs specified is not found cannot link artifacts {artifacts}") sys.exit(1) @@ -139,7 +138,7 @@ def add_assets(asset): assets = [] for item in asset: asset_hash = {"name": item.split("=")[0], "url": item.split("=")[1]} - assets.push(asset_hash) + assets.append(asset_hash) return assets @@ -171,7 +170,7 @@ def add_artifacts(project, project_url, artifacts): matched = [job for job in jobs if job.name == artifact][0] job_id = matched.id artifact_link = { - "name": f"Artifact: {artifacts}", + "name": f"Artifact: {artifact}", "url": f"{project_url}/-/jobs/{job_id}/artifacts/download", } assets.append(artifact_link)