Skip to content

Commit 56beb23

Browse files
committed
Merge branch 'hotfix/v2.5.2'
2 parents 77b0dc1 + 2c82c85 commit 56beb23

File tree

4 files changed

+101
-6
lines changed

4 files changed

+101
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## 2.5.2 (2022-08-12)
4+
5+
- Fixed an issue when project tasks with a title didn't work (issue [#3274](https://github.com/platformio/platformio-vscode-ide/issues/3274))
6+
37
## 2.5.1 (2022-07-28)
48

59
**Requires VSCode 1.63 or above**

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "platformio-ide",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"publisher": "platformio",
55
"engines": {
66
"vscode": "^1.63.0"
77
},
88
"license": "Apache-2.0",
99
"displayName": "PlatformIO IDE",
10-
"description": "Professional development environment for Embedded, IoT, Arduino, CMSIS, ESP-IDF, FreeRTOS, libOpenCM3, mbed OS, Pulp OS, SPL, STM32Cube, Zephyr RTOS, ARM, AVR, Espressif (ESP8266/ESP32), FPGA, MCS-51 (8051), MSP430, Nordic (nRF51/nRF52), NXP i.MX RT, PIC32, RISC-V, STMicroelectronics (STM8/STM32), Teensy",
10+
"description": "Professional development environment for Embedded, IoT, Arduino, CMSIS, ESP-IDF, FreeRTOS, libOpenCM3, mbed OS, Pulp OS, SPL, STM32Cube, Zephyr RTOS, ARM, AVR, Espressif (ESP8266/ESP32), FPGA, MCS-51 (8051), MSP430, Nordic (nRF51/nRF52), PIC32, RISC-V, STMicroelectronics (STM8/STM32), Teensy",
1111
"categories": [
1212
"Programming Languages",
1313
"Linters",
@@ -632,14 +632,14 @@
632632
"platformio-vscode-debug": "~1.4.1"
633633
},
634634
"devDependencies": {
635-
"@babel/core": "~7.18.9",
635+
"@babel/core": "~7.18.10",
636636
"@babel/eslint-parser": "~7.18.9",
637637
"@babel/plugin-proposal-class-properties": "~7.18.6",
638-
"@babel/preset-env": "~7.18.9",
638+
"@babel/preset-env": "~7.18.10",
639639
"@types/node": "~14",
640640
"@types/vscode": "~1.63.0",
641641
"babel-loader": "~8.2.5",
642-
"eslint": "~8.20.0",
642+
"eslint": "~8.21.0",
643643
"eslint-import-resolver-webpack": "~0.13.2",
644644
"eslint-plugin-import": "~2.26.0",
645645
"prettier": "~2.7.1",

scripts/publish.py

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import os
16+
import shutil
17+
import subprocess
18+
from dataclasses import dataclass
19+
from pathlib import Path
20+
21+
from platformio.package.manager.tool import ToolPackageManager
22+
from platformio.package.meta import PackageSpec
23+
24+
25+
@dataclass
26+
class PlatformItem:
27+
target: str
28+
system: str
29+
30+
def __init__(self, target, system=None):
31+
self.target = target
32+
self.system = system
33+
34+
35+
PLATFORM_LIST = [
36+
PlatformItem("win32-arm64"),
37+
PlatformItem("win32-ia32", "windows_x86"),
38+
PlatformItem("win32-x64", "windows_amd64"),
39+
PlatformItem("linux-arm64"),
40+
PlatformItem("linux-armhf"),
41+
PlatformItem("linux-x64"),
42+
PlatformItem("alpine-x64"),
43+
PlatformItem("alpine-arm64"),
44+
PlatformItem("darwin-arm64"),
45+
PlatformItem("darwin-x64", "darwin_x86_64"),
46+
PlatformItem("web"),
47+
]
48+
49+
ROOT_DIR = (Path(__file__).parent / "..").resolve()
50+
PREDOWNLOADED_DIR = ROOT_DIR / "assets" / "predownloaded"
51+
52+
53+
def cleanup_predownload_dir(path: Path):
54+
for child in path.iterdir():
55+
if child.name != ".keep":
56+
os.remove(str(child))
57+
58+
59+
def predownload_portable_python(dst_dir: Path, custom_system):
60+
tm = ToolPackageManager()
61+
package = tm.fetch_registry_package(PackageSpec("platformio/python-portable"))
62+
assert package
63+
version = tm.pick_best_registry_version(
64+
package["versions"], custom_system=custom_system
65+
)
66+
if not version:
67+
print(f"Could not find portable Python for {custom_system}")
68+
return
69+
pkgfile = tm.pick_compatible_pkg_file(version["files"], custom_system=custom_system)
70+
dlfile_path = tm.download(pkgfile["download_url"], pkgfile["checksum"]["sha256"])
71+
shutil.copy(dlfile_path, dst_dir / os.path.basename(pkgfile["download_url"]))
72+
73+
74+
if __name__ == "__main__":
75+
subprocess.run(["yarn", "build"], cwd=ROOT_DIR)
76+
for item in PLATFORM_LIST:
77+
print(f"Publishing {item}")
78+
cleanup_predownload_dir(PREDOWNLOADED_DIR)
79+
if item.system:
80+
predownload_portable_python(PREDOWNLOADED_DIR, item.system)
81+
subprocess.run(
82+
[
83+
"npx",
84+
"vsce",
85+
"publish",
86+
"--allow-star-activation",
87+
"--target",
88+
item.target,
89+
],
90+
cwd=ROOT_DIR,
91+
)

src/project/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default class ProjectTaskManager {
120120
task: projectTask.id,
121121
},
122122
vscode.workspace.getWorkspaceFolder(vscode.Uri.file(this.projectDir)),
123-
projectTask.title,
123+
projectTask.id,
124124
ProjectTaskManager.PROVIDER_TYPE,
125125
new vscode.ProcessExecution(
126126
IS_WINDOWS ? 'platformio.exe' : 'platformio',

0 commit comments

Comments
 (0)