Remove unused import #253
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rename | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
# Runs do not need to be concurrent | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rename: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Replace instances | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git checkout -b temp master | |
cp .github/files/README.rst README.rst | |
rm -rf docs .github .readthedocs.yml tests | |
mv discord selfcord | |
sed -i -e 's/import discord/import selfcord/g' -e '/from discord_protos/!{s/from discord/from selfcord/g}' -e '/from discord_protos/!{s/from discord/from selfcord/g}' -e 's/discord\.py-self/selfcord\.py/g' -e '/\(discord\.com\|discord\.gg\|discord\.new\)/! s/discord\./selfcord\./g' $(find selfcord examples -name "*.py") | |
sed -i -e 's/discord/selfcord/g' pyproject.toml MANIFEST.in | |
sed -i -e "s/prefix = 'discord'/prefix = 'selfcord'/" setup.py | |
- name: Push changes | |
run: | | |
git add . | |
git stash | |
git switch renamed | |
git checkout stash -- . | |
(git commit -am "Synchronize selfcord") || true | |
(git push origin renamed) || true |