From 8bd413cc4350b931c4b3d598ed10f48bd86e0b1c Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Sat, 10 Jun 2023 19:39:55 -0400 Subject: [PATCH] fix: Fix the ninjacookie call (#116) Fix ninjacookie call and improve the release workflow. --- .github/workflows/release.yaml | 14 +++++++------- src/scicookie/cli.py | 6 ++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6ffab49c..fb5ca495 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,13 +38,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: makim release.dry - # - name: Run semantic release - # if: ${{ github.event_name == 'workflow_dispatch' }} - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # poetry config pypi-token.pypi ${PYPI_TOKEN} - # makim release.ci + - name: Run semantic release + if: ${{ github.event_name == 'workflow_dispatch' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + poetry config pypi-token.pypi ${PYPI_TOKEN} + makim release.ci - name: Generate documentation with changes from semantic-release run: makim docs.build diff --git a/src/scicookie/cli.py b/src/scicookie/cli.py index 3bc6c0a4..781b8459 100644 --- a/src/scicookie/cli.py +++ b/src/scicookie/cli.py @@ -67,7 +67,7 @@ def call_cookiecutter(profile: Profile, answers: dict): answers_profile[choice_id] = "yes" for question_id, answer in answers_profile.items(): - cookie_args.append(f'{question_id}="{answer}"') + cookie_args.append(f"{question_id}={answer}") sh_extras = { "_in": sys.stdin, @@ -79,9 +79,7 @@ def call_cookiecutter(profile: Profile, answers: dict): "_bg_exc": False, } - p = sh.cookieninja( - "--no-input", PACKAGE_PATH, *[" ".join(cookie_args)], **sh_extras - ) + p = sh.cookieninja("--no-input", PACKAGE_PATH, *cookie_args, **sh_extras) try: p.wait()