From 54b0edd1a2f7876284d4483cb6fb6efdc8b2b7c4 Mon Sep 17 00:00:00 2001 From: Richard Bairwell Date: Mon, 11 Jul 2022 19:51:18 +0100 Subject: [PATCH] Add instructions for Microsoft PowerShell These are the necessary instructions for downloading Dockle for Windows 64bit using Microsoft PowerShell 7 (which is slightly different from "Windows PowerShell 5" - MS PowerShell is the newest version) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2110ea0..973afd3 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ See [Installation](#installation) and [Common Examples](#common-examples) - [Debian/Ubuntu](#debianubuntu) - [Arch Linux](#arch-linux) - [Windows](#windows) + - [Microsoft PowerShell 7](#microsoft-powershell-7) - [Binary](#binary) - [asdf](#asdf) - [From source](#from-source) @@ -135,7 +136,13 @@ VERSION=$( $ unzip dockle.zip && rm dockle.zip $ ./dockle.exe [IMAGE_NAME] ``` - +## Microsoft PowerShell 7 +```bash +if (((Invoke-WebRequest "https://api.github.com/repos/goodwithtech/dockle/releases/latest").Content) -match '"tag_name":"v(?[^"]+)"') { +$VERSION=$Matches.ver && +Invoke-WebRequest "https://github.com/goodwithtech/dockle/releases/download/v${VERSION}/dockle_${VERSION}_Windows-64bit.zip" -OutFile dockle.zip && +Expand-Archive dockle.zip && Remove-Item dockle.zip } +``` ## Binary You can get the latest version binary from [releases page](https://github.com/goodwithtech/dockle/releases/latest).