Skip to content

Commit

Permalink
Auto-create pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Jul 29, 2024
1 parent 9bfc2d1 commit 41a5521
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,29 +81,34 @@ runs:
fi
shell: bash

- name: check for deprecated features
- name: Git config
if: env.IS_GIT_BEHIND != 'true'
run: |
if [[ -f setup.cfg ]]; then
echo " "
echo "WIPACrepo/wipac-dev-py-setup-action no longer supports 'setup.cfg'"
echo "Migration Steps:"
echo " 1. Manually move attributes from [wipac:cicd_setup_builder]"
echo " section to WIPACrepo/wipac-dev-py-setup-action's 'with' block."
echo " See https://github.com/WIPACrepo/wipac-dev-py-setup-action#inputs"
echo " 2. Migrate any non-autogenerated configuration to 'pyproject.toml', "
echo " then delete 'setup.cfg'. If there is no non-autogenerated"
echo " configuration, simply delete 'setup.cfg'."
echo " 3. Re-run this action!"
exit 1
fi
git config user.name ${{ inputs.git_committer_name }}
git config user.email ${{ inputs.git_committer_email }}
shell: bash

- name: Git config
- name: check for deprecated features
if: env.IS_GIT_BEHIND != 'true'
run: |
git config user.name ${{ inputs.git_committer_name }}
git config user.email ${{ inputs.git_committer_email }}
if [[ -f setup.cfg ]]; then
if [[ ! -f pyproject.toml ]]; then
# auto-create a blank toml that will be added to in next steps
# when this action runs on next commit, it will match the 'else' condition below
touch pyproject.toml
else
echo " "
echo "WIPACrepo/wipac-dev-py-setup-action no longer supports 'setup.cfg'"
echo "Migration Steps:"
echo " 1. Manually move attributes from [wipac:cicd_setup_builder]"
echo " section to WIPACrepo/wipac-dev-py-setup-action's 'with' block."
echo " See https://github.com/WIPACrepo/wipac-dev-py-setup-action#inputs"
echo " 2. Migrate any non-autogenerated configuration to 'pyproject.toml', "
echo " then delete 'setup.cfg'. If there is no non-autogenerated"
echo " configuration, simply delete 'setup.cfg'."
echo " 3. Re-run this action!"
fi
fi
shell: bash

- name: Build pyproject.toml + README.md (and commit)
Expand Down

0 comments on commit 41a5521

Please sign in to comment.