diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index e2a1846..15162c4 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -custom: "https://discord.gg/ZggUCHsQqg" \ No newline at end of file +patreon: Oronder +custom: "https://discord.gg/ZggUCHsQqg" diff --git a/.github/workflows/foundry_release.py b/.github/workflows/foundry_release.py index 4603187..0cb6484 100644 --- a/.github/workflows/foundry_release.py +++ b/.github/workflows/foundry_release.py @@ -131,7 +131,7 @@ def push_release(module_json: dict) -> None: def post_update_to_discord() -> None: INFO('Notifying Discord of new release') - deduped_changes = list(dict.fromkeys(CHANGES)) + deduped_changes = list(dict.fromkeys(CHANGES.split('\n'))) conn = HTTPSConnection("api.oronder.com") conn.request( "POST", '/update_discord', diff --git a/release.py b/release.py index 308709f..db9d3c6 100644 --- a/release.py +++ b/release.py @@ -10,6 +10,12 @@ type=click.Choice(['major', 'minor', 'revision']) ) def run_release(release): + has_uncommited_changes = bool(subprocess.run( + 'git add . && git diff && git diff --cached', + capture_output=True, shell=True, text=True).stdout) + if has_uncommited_changes: + subprocess.run('git stash', shell=True) + subprocess.run('git pull', shell=True) major, minor, revision = max( [ @@ -36,6 +42,8 @@ def run_release(release): tag = f'{major}.{minor}.{revision}' subprocess.run(f'git tag {tag} && git push origin {tag}', shell=True) + if has_uncommited_changes: + subprocess.run('git stash pop', shell=True) if __name__ == '__main__':