Skip to content

Commit

Permalink
More 'session' fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Dec 6, 2023
1 parent 727e2be commit 49aac81
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
2 changes: 2 additions & 0 deletions volare/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ def enable_or_build_cmd(
use_repo_at,
build_magic,
push_libraries,
session,
):
"""
Attempts to activate a given PDK version. If the version is not found locally or remotely,
Expand Down Expand Up @@ -378,6 +379,7 @@ def enable_or_build_cmd(
},
include_libraries=include_libraries,
output=console,
session=session,
)
except Exception as e:
console.print(f"[red]{e}")
Expand Down
2 changes: 1 addition & 1 deletion volare/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "0.15.1"
__version__ = "0.15.2"

if __name__ == "__main__":
print(__version__, end="")
12 changes: 11 additions & 1 deletion volare/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,16 @@ def push(
@opt_pdk_root
@opt_push
@click.argument("version")
def push_cmd(owner, repository, pre, pdk_root, pdk, version, push_libraries):
def push_cmd(
owner,
repository,
pre,
pdk_root,
pdk,
version,
push_libraries,
session,
):
"""
For maintainers: Package and release a build to the public.
Expand All @@ -258,6 +267,7 @@ def push_cmd(owner, repository, pre, pdk_root, pdk, version, push_libraries):
repository=repository,
pre=pre,
push_libraries=push_libraries,
session=session,
)
except Exception as e:
console.print(f"[red]Failed to push version: {e}")
Expand Down
15 changes: 13 additions & 2 deletions volare/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,24 @@ def fetch(
console.print(
f"Version {version} not found remotely, attempting to build…"
)
build(pdk_root=pdk_root, pdk=pdk, version=version, **build_kwargs)
build(
pdk_root=pdk_root,
pdk=pdk,
version=version,
**build_kwargs,
)
if also_push:
if push_kwargs["push_libraries"] is None:
push_kwargs["push_libraries"] = Family.by_name[
pdk
].default_includes.copy()
push(pdk_root=pdk_root, pdk=pdk, version=version, **push_kwargs)
push(
pdk_root=pdk_root,
pdk=pdk,
version=version,
session=session,
**push_kwargs,
)
else:
if e.response is not None:
raise RuntimeError(
Expand Down

0 comments on commit 49aac81

Please sign in to comment.