Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Apr 20, 2024
1 parent 9ae21ab commit 76dbd78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
echo "version=$ver" >> $GITHUB_OUTPUT
make_dist:
name: Make distribution
uses: MODFLOW-USGS/modflow6/.github/workflows/release.yml@develop
uses: wpbonelli/modflow6/.github/workflows/release.yml@fix-release-ci
needs: set_options
with:
# If the workflow is manually triggered, the maintainer must manually set approve=true to approve a release.
Expand Down
7 changes: 3 additions & 4 deletions distribution/build_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from os import PathLike, environ
from pathlib import Path
from pprint import pprint
from shutil import copy, copyfile, copytree, ignore_patterns
from shutil import copy, copyfile, copytree, ignore_patterns, rmtree
from typing import List, Optional

import pytest
Expand Down Expand Up @@ -114,19 +114,18 @@ def setup_examples(
models: Optional[List[str]] = None,
):
examples_path = Path(examples_path).expanduser().absolute()

# download example models zip asset
latest = get_release("MODFLOW-USGS/modflow6-examples", "latest")
assets = latest["assets"]
asset = next(
iter([a for a in assets if a["name"] == "modflow6-examples.zip"]), None
)
# download example models zip asset
download_and_unzip(asset["browser_download_url"], examples_path, verbose=True)

# filter examples for models selected for release
for p in examples_path.glob("*"):
if not any(m in p.stem for m in models):
p.unlink()
rmtree(p)

# list folders with mfsim.nam (recursively)
# and add run.sh/bat script to each folder
Expand Down

0 comments on commit 76dbd78

Please sign in to comment.