Skip to content

Commit 48a1355

Browse files
author
高魏洪
committed
fix: layer code support http bug
1 parent 3fe39c2 commit 48a1355

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

__tests__/e2e/ci-mac-linux.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ s model remove -t s_file.yaml
4848
s remove -y -t s_file.yaml
4949
cd ..
5050

51+
echo "test layer code support http"
52+
FC_COMPONENT_VERSION=$fc_component_version| '../../../'
53+
s cli $FC_COMPONENT_VERSION layer publish --layer-name test --code https://images.devsapp.cn/bin/supergateway --compatible-runtime custom.debian12 --region cn-hangzhou -a quanxi
54+
s cli $FC_COMPONENT_VERSION layer remove --layer-name test --region cn-hangzhou -a quanxi
55+
5156
echo "test go runtime"
5257
cd go
5358
export fc_component_function_name=go1-$(uname)-$(uname -m)-$RANDSTR

publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Type: Component
33
Name: fc3
44
Provider:
55
- 阿里云
6-
Version: 0.1.17
6+
Version: 0.1.18
77
Description: 阿里云函数计算全生命周期管理
88
HomePage: https://github.com/devsapp/fc3
99
Organization: 阿里云函数计算(FC)

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ export async function _downloadFromUrl(url: string): Promise<string> {
341341
logger.debug(`Downloaded file to: ${downloadPath}`);
342342

343343
// 返回下载文件路径,由主流程决定是否需要压缩
344-
return downloadPath;
344+
return downloadPath.endsWith('.zip') ? downloadPath : `${downloadPath}.zip`;
345345
} catch (error) {
346346
// 如果下载失败,清理临时目录
347347
try {

0 commit comments

Comments
 (0)