Skip to content

Commit

Permalink
Fix: Allow checkkout with missing tag
Browse files Browse the repository at this point in the history
Bump version to 1.16.3

Signed-off-by: Jos Verlinde <[email protected]>
  • Loading branch information
Josverl committed Jan 26, 2024
1 parent c03da53 commit 7dfa01b
Show file tree
Hide file tree
Showing 11 changed files with 158 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repo-path = "./repos"

[tool.poetry]
name = "micropython-stubber"
version = "1.16.2"
version = "1.16.3"
description = "Tooling to create and maintain stubs for MicroPython"
authors = ["Jos Verlinde <[email protected]>"]
license = "MIT"
Expand Down
148 changes: 140 additions & 8 deletions scripts/get_firmwares.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/stubber/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""get the version"""


__version__ = "1.16.2"
__version__ = "1.16.3"
4 changes: 2 additions & 2 deletions src/stubber/basicgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _run_local_git(
return None
except subprocess.CalledProcessError as e: # pragma: no cover
# add some logging for github actions
log.error(f"{str(e)} : { e.stderr.decode('utf-8')}")
log.error(f"{str(e)} : { e.stderr}")
return None
if result.stderr and result.stderr != b"":
stderr = result.stderr
Expand Down Expand Up @@ -150,7 +150,7 @@ def checkout_tag(tag: str, repo: Optional[Union[str, Path]] = None) -> bool:
"""
checkout a specific git tag
"""
cmd = ["git", "checkout", "tags/" + tag, "--detach", "--quiet", "--force"]
cmd = ["git", "checkout", tag, "--quiet", "--force"]
result = _run_local_git(cmd, repo=repo, expect_stderr=True, capture_output=True)
if not result:
return False
Expand Down
2 changes: 1 addition & 1 deletion src/stubber/board/createstubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from ucollections import OrderedDict # type: ignore


__version__ = "v1.16.2"
__version__ = "v1.16.3"
ENOENT = 2
_MAX_CLASS_LEVEL = 2 # Max class nesting
LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
Expand Down
4 changes: 2 additions & 2 deletions src/stubber/board/createstubs_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- cross compilation, using mpy-cross, to avoid the compilation step on the micropython device
This variant was generated from createstubs.py by micropython-stubber v1.16.2
This variant was generated from createstubs.py by micropython-stubber v1.16.3
"""
# Copyright (c) 2019-2023 Jos Verlinde

Expand Down Expand Up @@ -59,7 +59,7 @@ def feed(self):

wdt.feed()

__version__ = "v1.16.2"
__version__ = "v1.16.3"
ENOENT = 2
_MAX_CLASS_LEVEL = 2 # Max class nesting
LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
Expand Down
4 changes: 2 additions & 2 deletions src/stubber/board/createstubs_db_min.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- cross compilation, using mpy-cross, to avoid the compilation step on the micropython device
This variant was generated from createstubs.py by micropython-stubber v1.16.2
This variant was generated from createstubs.py by micropython-stubber v1.16.3
"""
# Copyright (c) 2019-2023 Jos Verlinde

Expand Down Expand Up @@ -59,7 +59,7 @@ def feed(self):

wdt.feed()

__version__ = "v1.16.2"
__version__ = "v1.16.3"
ENOENT = 2
_MAX_CLASS_LEVEL = 2 # Max class nesting
LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
Expand Down
4 changes: 2 additions & 2 deletions src/stubber/board/createstubs_mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- cross compilation, using mpy-cross,
to avoid the compilation step on the micropython device
This variant was generated from createstubs.py by micropython-stubber v1.16.2
This variant was generated from createstubs.py by micropython-stubber v1.16.3
"""
# Copyright (c) 2019-2023 Jos Verlinde

Expand Down Expand Up @@ -50,7 +50,7 @@ def feed(self):

wdt.feed()

__version__ = "v1.16.2"
__version__ = "v1.16.3"
ENOENT = 2
_MAX_CLASS_LEVEL = 2 # Max class nesting
LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
Expand Down
4 changes: 2 additions & 2 deletions src/stubber/board/createstubs_mem_min.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- cross compilation, using mpy-cross,
to avoid the compilation step on the micropython device
This variant was generated from createstubs.py by micropython-stubber v1.16.2
This variant was generated from createstubs.py by micropython-stubber v1.16.3
"""
# Copyright (c) 2019-2023 Jos Verlinde

Expand Down Expand Up @@ -50,7 +50,7 @@ def feed(self):

wdt.feed()

__version__ = "v1.16.2"
__version__ = "v1.16.3"
ENOENT = 2
_MAX_CLASS_LEVEL = 2 # Max class nesting
LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
Expand Down
2 changes: 1 addition & 1 deletion src/stubber/board/createstubs_min.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def feed(self):

wdt.feed()

__version__ = "v1.16.2"
__version__ = "v1.16.3"
ENOENT = 2
_MAX_CLASS_LEVEL = 2 # Max class nesting
LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
Expand Down
6 changes: 4 additions & 2 deletions src/stubber/utils/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ def match_lib_with_mpy(version_tag: str, mpy_path: Path, lib_path: Path) -> bool
# micropython-lib is now a submodule
result = git.checkout_tag(version_tag, lib_path)
if not result:
log.error("Could not checkout micropython-lib @master")
return False
log.warning(f"Could not checkout micropython-lib @{version_tag}")
if not git.checkout_tag("master", lib_path):
log.error("Could not checkout micropython-lib @master")
return False
return git.sync_submodules(mpy_path)
else:
log.info(
Expand Down

0 comments on commit 7dfa01b

Please sign in to comment.