Skip to content

Commit 47c90d1

Browse files
committed
fix: 修改为PY32Duino
1 parent 4db55da commit 47c90d1

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

Diff for: .github/workflows/release.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55

66
repository_dispatch:
7-
types: [AirMCU,AirISP]
7+
types: [release]
88

99

1010
workflow_dispatch:
@@ -24,18 +24,18 @@ jobs:
2424

2525
- uses: ncipollo/release-action@v1
2626
with:
27-
artifacts: "package_air_index.json,package_air_cn_index.json"
27+
artifacts: "package_py32_index.json,package_py32_cn_index.json"
2828
tag: "Nightly"
2929
allowUpdates: true
3030

31-
- name: publish OSS
32-
env:
33-
OSS_CONFIG: ${{ secrets.OSS_CONFIG }}
34-
OSS_NAME: ${{ secrets.OSS_NAME }}
35-
run: |
36-
sudo apt update
37-
wget http://gosspublic.alicdn.com/ossutil/1.7.1/ossutil64
38-
sudo chmod 755 ossutil64
39-
echo -e "${OSS_CONFIG}" > ~/.ossutilconfig
40-
./ossutil64 cp -u -r temp/ oss://${OSS_NAME}/
41-
./ossutil64 cp -u package_air_cn_index.json oss://${OSS_NAME}/
31+
# - name: publish OSS
32+
# env:
33+
# OSS_CONFIG: ${{ secrets.OSS_CONFIG }}
34+
# OSS_NAME: ${{ secrets.OSS_NAME }}
35+
# run: |
36+
# sudo apt update
37+
# wget http://gosspublic.alicdn.com/ossutil/1.7.1/ossutil64
38+
# sudo chmod 755 ossutil64
39+
# echo -e "${OSS_CONFIG}" > ~/.ossutilconfig
40+
# ./ossutil64 cp -u -r temp/ oss://${OSS_NAME}/
41+
# ./ossutil64 cp -u package_air_cn_index.json oss://${OSS_NAME}/

Diff for: main.py

+21-21
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import hashlib
55
import os
66

7-
packagesPath = "package_air_index.json"
8-
packagesCNPath = "package_air_cn_index.json"
7+
packagesPath = "package_py32_index.json"
8+
packagesCNPath = "package_py32_cn_index.json"
99

1010
GCCVersion = "12.2.1-1.2"
1111
AirISPVersion = "" # 不定义具体的版本,在GetAirISPVersion函数中创造
@@ -104,7 +104,7 @@ def DownloadAndCheck(url, fileName, host, suffixName):
104104
temp['size'] = ComputeSize(tempPath)
105105

106106
tempCn = temp.copy()
107-
tempCn['url'] = "https://arduino.luatos.com/" + fileName + suffixName
107+
tempCn['url'] = "https://arduino.py32.halfsweet.cn/" + fileName + suffixName
108108
return temp, tempCn
109109

110110

@@ -221,45 +221,45 @@ def f(host, suffixName):
221221
return data, dataCn
222222

223223

224-
def PlatformsAirMCU(version):
225-
fileName = "AirMCU-" + version + ".zip"
226-
url = "https://github.com/Air-duino/Arduino-AirMCU/releases/download/" + version + "/" + fileName
224+
def PlatformsPY32(version):
225+
fileName = "Arduino-PY32-" + version + ".zip"
226+
url = "https://github.com/py32duino/Arduino-PY32/releases/download/" + version + "/" + fileName
227227
downloadFile(url)
228228
data = {}
229229
dataCn = {}
230-
data['name'] = "Air MCU"
231-
data['architecture'] = "AirMCU"
230+
data['name'] = "PY32 Arduino"
231+
data['architecture'] = "PY32"
232232
data['version'] = version
233233
data['category'] = "Contributed"
234-
data['help'] = {'online': "https://arduino.luatos.com"}
234+
data['help'] = {'online': "https://arduino.py32.halfsweet.cn"}
235235
data['url'] = url
236236
data['archiveFileName'] = fileName
237237
data['checksum'] = "SHA-256:" + ComputeSHA256(fileName)
238238
data['size'] = ComputeSize(fileName)
239239
data['boards'] = [{'name': "Air001"}]
240-
data['toolsDependencies'] = [{'packager': "AirM2M", 'name': "xpack-arm-none-eabi-gcc", 'version': GCCVersion},
241-
{'packager': "AirM2M", 'name': "CMSIS", 'version': CMSISVersion},
242-
{'packager': "AirM2M", 'name': "AirISP", 'version': AirISPVersion}]
240+
data['toolsDependencies'] = [{'packager': "PY32Duino", 'name': "xpack-arm-none-eabi-gcc", 'version': GCCVersion},
241+
{'packager': "PY32Duino", 'name': "CMSIS", 'version': CMSISVersion},
242+
{'packager': "PY32Duino", 'name': "AirISP", 'version': AirISPVersion}]
243243
dataCn = data.copy()
244-
dataCn['url'] = "https://arduino.luatos.com/" + fileName
244+
dataCn['url'] = "https://arduino.py32.halfsweet.cn/" + fileName
245245
return data, dataCn
246246

247247

248-
def PackagesAirM2M():
248+
def PackagesPY32Duino():
249249
data = {}
250250
dataCn = {}
251-
data['name'] = "AirM2M"
252-
data['maintainer'] = "AirM2M"
253-
data['websiteURL'] = "https://arduino.luatos.com"
251+
data['name'] = "PY32Duino"
252+
data['maintainer'] = "PY32Duino"
253+
data['websiteURL'] = "https://arduino.py32.halfsweet.cn"
254254
data['email'] = "[email protected]"
255-
data['help'] = {'online': "https://arduino.luatos.com"}
255+
data['help'] = {'online': "https://arduino.py32.halfsweet.cn"}
256256
dataCn = data.copy()
257257
platforms = []
258258
platformsCn = []
259259

260-
PlatformsVersion.extend(GetRepoVersion("Air-duino", "Arduino-AirMCU"))
260+
PlatformsVersion.extend(GetRepoVersion("PY32Duino", "Arduino-PY32"))
261261
for item in PlatformsVersion:
262-
temp, tempCn = PlatformsAirMCU(item)
262+
temp, tempCn = PlatformsPY32(item)
263263
platforms.append(temp)
264264
platformsCn.append(tempCn)
265265
data['platforms'] = platforms
@@ -287,7 +287,7 @@ def PackagesAirM2M():
287287
def Encode():
288288
data = {}
289289
dataCn = {}
290-
temp, tempCn = PackagesAirM2M()
290+
temp, tempCn = PackagesPY32Duino()
291291
data['packages'] = [temp]
292292
dataCn['packages'] = [tempCn]
293293
json_str = json.dumps(data, indent=2)

0 commit comments

Comments
 (0)