Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
mods: fail the script, and auto push tags
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Aug 16, 2024
1 parent b75bcbd commit a824f6a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/update-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update Tags

on:
push:
branches:
- main

jobs:
push-tags:
runs-on: ubuntu-latest
steps:
- name: Bump Version and Push Tag
id: tag_version
uses: mathieudutour/[email protected]
with:
tag_prefix: v
default_bump: patch

- name: Update latest minimal tag
run: |
git push --delete origin v1
git tag --delete v1
git tag v1
git push origin v1
2 changes: 2 additions & 0 deletions scripts/mod-bundler/emit-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def split_comma_sep_val(str):
# Fail if the user hasn't changed anything
if os.getenv("NAME") == "NAME" or os.getenv("DESCRIPTION") == "DESCRIPTION" or os.getenv("AUTHORS") == "authorName1,authorName2":
print("Mod metadata is just copy-pasted from the example and not actually setup, do that!")
exit(1)

metadata = {
"schemaVersion": os.getenv("SCHEMA_VERSION"),
Expand All @@ -25,6 +26,7 @@ def split_comma_sep_val(str):
}
if os.getenv("WEBSITE_URL") != "":
metadata["websiteUrl"] = os.getenv("WEBSITE_URL")
exit(1)

# Fail if the user hasn't changed anything
if metadata["websiteUrl"] == "https://www.example.com/this/is/optional":
Expand Down

0 comments on commit a824f6a

Please sign in to comment.