Remove UD_DASHBOARD, maybe later #14
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
on: | |
push: | |
branches: | |
- main | |
jobs: | |
strip-modules: | |
name: Strip Modules and Commit Changes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Remove UDM Modules | |
## Delete all src/modules folders excepting discord | |
## Also Delete all the src/config/modules files, excepting index.ts and discord.ts | |
## And delete all text between //$StripStart to //$StripEnd comments | |
run: | | |
find src/modules -mindepth 1 -maxdepth 1 -type d -not -name discord -exec rm -rf {} \; | |
find src/config/modules -type f -not -name 'index.ts' -not -name 'discord.ts' -delete | |
find src -type f -exec sed -i '/\/\/\$StripStart/,/\/\/\$StripEnd/d' {} \; | |
- name: Remove release branch | |
run: | | |
git push origin --delete release | |
## Commit Changes to release | |
- name: Commit Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add . | |
git commit -m "Stripped Modules" | |
git push origin main:release |