Skip to content

Commit

Permalink
More work on the CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix "xq" Queißner committed Feb 17, 2024
1 parent 9b7822a commit 9342d9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-tags: true # required for "git describe"

# - name: Fetch more data from git
# run: |
# # fetch everything back till the $(ZIG_VERSION) tag.
# # https://stackoverflow.com/a/58082274
# git fetch --shallow-exclude ${{ env.ZIG_VERSION }}
# git fetch --deepen=2
fetch-depth: 0

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
Expand Down Expand Up @@ -53,13 +47,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-tags: true # required for "git describe"

# - name: Fetch more data from git
# run: |
# # fetch everything back till the $(ZIG_VERSION) tag.
# # https://stackoverflow.com/a/58082274
# git fetch --shallow-exclude ${{ env.ZIG_VERSION }}
# git fetch --deepen=2
fetch-depth: 0

- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
Expand Down
5 changes: 3 additions & 2 deletions tools/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"zig",
"git",
]
REQUIRED_ZIG_VERSION="0.11.0"


REPO_ROOT = Path(__file__).parent.parent
Expand Down Expand Up @@ -171,7 +172,7 @@ def get_version_from_git() -> str:
raw_git_out = slurp("git", "describe", "--match", "*.*.*", "--tags", "--abbrev=9", cwd=REPO_ROOT, allow_failure=True).strip().decode()
if len(raw_git_out) == 0:
print("failed to get version from git, using 'development'", file=sys.stderr)
return "development"
return f"{REQUIRED_ZIG_VERSION}-development"

def render_version(major,minor,patch,counter,hash):
return f"{major}.{minor}.{patch}-{counter}-{hash}"
Expand Down Expand Up @@ -249,7 +250,7 @@ def main():

check_required_tools(REQUIRED_TOOLS)

check_zig_version("0.11.0")
check_zig_version(REQUIRED_ZIG_VERSION)

print("preparing environment...")

Expand Down

0 comments on commit 9342d9a

Please sign in to comment.