Skip to content

Commit

Permalink
updated architecture links
Browse files Browse the repository at this point in the history
  • Loading branch information
adechant committed Oct 17, 2023
1 parent ec3caa6 commit 1f0ee78
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion custom_components/ha_vscode/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DOMAIN = "ha_vscode"
PACKAGE_NAME = "custom_components.ha_vscode"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "0.1.48"
VERSION = "0.1.50"
MINIMUM_HA_VERSION = "2023.6.0"
ICON = "mdi:format-quote-close"
CONF_ENABLED = "enabled"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ha_vscode/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/adechant/ha_vscode/issues",
"requirements": [],
"version": "0.1.48"
"version": "0.1.50"
}
14 changes: 8 additions & 6 deletions custom_components/ha_vscode/vscode_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@

LOGGER: logging.Logger = logging.getLogger(PACKAGE_NAME)

# don't know why but there is no alpine-armhf version, only linux
architecture_map = {
"x86_64": "x64",
"armv7l": "armhf",
"aarch64": "arm64",
"x86_64": "alpine-x64",
"armv7l": "linux-armhf",
"aarch64": "alpine-arm64",
}


class VSCodeDeviceAPI:
"""Command line VSCode Tunnel OAuth device flow"""

Expand Down Expand Up @@ -60,7 +62,7 @@ def downloadViaCurl(self, outdir):
getVSCodeCLIcurl = [
"curl",
"-Lk",
f"https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-{architecture_map[architecture]}",
f"https://code.visualstudio.com/sha/download?build=stable&os=cli-{architecture_map[architecture]}",
"--output",
outdir,
]
Expand Down Expand Up @@ -92,7 +94,7 @@ def downloadViaWGet(self, outdir):
architecture = os.uname().machine
getVSCodeCLIwget = [
"wget",
f"https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-{architecture_map[architecture]}",
f"https://code.visualstudio.com/sha/download?build=stable&os=cli-{architecture_map[architecture]}",
"-O",
outdir,
]
Expand Down Expand Up @@ -162,7 +164,7 @@ def reader(self):
while True:
line = self.proc.stdout.readline().strip()
if line is not None:
if len(line) > 0 :
if len(line) > 0:
self.log.debug("Parsing line: " + line)
if not self.checkForOauthToken(line):
self.checkForDevURL(line)
Expand Down

0 comments on commit 1f0ee78

Please sign in to comment.