Skip to content

Commit

Permalink
feat:
Browse files Browse the repository at this point in the history
1、调整 ci 里的兼容引擎下载连接
2、兼容引擎 hash 验证 url 获取连接
  • Loading branch information
b1rdfree committed Nov 1, 2024
1 parent 39defe1 commit 6e53dbb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/yakit-ce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ jobs:

- name: "Download Yak Legacy Engine via wget(Windows)"
if: ${{ env.IS_TAG_RELEASE != 'tag/v' && env.PACKAGING_PLATFORM == 'win' && env.COMPATIBILITY_MODE == 'legacy' }}
id: download-windows-engine
run: ll ./bins/ && rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
id: download-windows-leagacy-engine
run: rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
- name: Build Yakit Legacy (WIN)
if: ${{ env.IS_TAG_RELEASE != 'tag/v' && env.PACKAGING_PLATFORM == 'win' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/yakit-ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ jobs:
working-directory: ./
run: yarn pack-linux-ee-legacy

- name: "Download Yak Engine via wget(Windows)"
- name: "Download Yak Legacy Engine via wget(Windows)"
if: ${{ env.IS_TAG_RELEASE == 'tag/v' || env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'win' }}
id: download-windows-engine
run: ll ./bins/ && rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
id: download-windows-leagacy-engine
run: rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
- name: Build EE Yakit Legacy (WIN)
if: ${{ env.IS_TAG_RELEASE != 'tag/v' && env.PACKAGING_PLATFORM == 'win' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/yakit-se.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ jobs:
working-directory: ./
run: yarn pack-linux-se-legacy

- name: "Download Yak Engine via wget(Windows)"
- name: "Download Yak Legacy Engine via wget(Windows)"
if: ${{ env.PACKAGING_PLATFORM == 'mwl' || env.PACKAGING_PLATFORM == 'win' }}
id: download-windows-engine
run: ll ./bins/ && rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
id: download-windows-leagacy-engine
run: rm ./bins/yak_windows_amd64.zip && wget -O bins/yak_windows_amd64.exe https://yaklang.oss-accelerate.aliyuncs.com/yak/latest/yak_windows_legacy_amd64.exe && zip ./bins/yak_windows_amd64.zip ./bins/yak_windows_amd64.exe && rm ./bins/yak_windows_amd64.exe
- name: Build SE Yakit Legacy (WIN)
if: ${{ env.PACKAGING_PLATFORM == 'win' && env.COMPATIBILITY_MODE == 'legacy' }}
env:
Expand Down
10 changes: 9 additions & 1 deletion app/main/handlers/utils/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ async function getAvailableOSSDomain() {
/**获取校验url */
const getCheckTextUrl = async (version) => {
const domain = await getAvailableOSSDomain()
let system_mode = ""
try {
system_mode = fs.readFileSync(loadExtraFilePath(path.join("bins", "yakit-system-mode.txt"))).toString("utf8")
} catch (error) {
console.log("error", error)
}
const suffix = system_mode === "legacy"

let url = ""
switch (process.platform) {
case "darwin":
Expand All @@ -103,7 +111,7 @@ const getCheckTextUrl = async (version) => {
}
break
case "win32":
url = `https://${domain}/yak/${version}/yak_windows_amd64.exe.sha256.txt`
url = `https://${domain}/yak/${version}/yak_windows_${suffix ? "leagacy_" : ""}amd64.exe.sha256.txt`
break
case "linux":
if (process.arch === "arm64") {
Expand Down

0 comments on commit 6e53dbb

Please sign in to comment.