Skip to content

Commit

Permalink
Stage Channel Support
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Feb 15, 2024
1 parent c4f779d commit 10f22dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
custom: "https://discord.gg/ZggUCHsQqg"
patreon: Oronder
custom: "https://discord.gg/ZggUCHsQqg"
2 changes: 1 addition & 1 deletion .github/workflows/foundry_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 8 additions & 0 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand All @@ -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__':
Expand Down

0 comments on commit 10f22dd

Please sign in to comment.