小编BT3*_*BT3的帖子

git推送后Google函数源未刷新

我将谷歌云函数的源定义为谷歌云存储库。我更改了我的函数源代码,提交它并通过“git push --all google”推送到存储库中。我在存储库中看到新版本的函数代码,但云函数采用旧版本。

所以我需要部署我的函数的新版本。我知道我不能使用控制台来做到这一点。当我尝试使用 SDK 部署它时,我收到

gcloud functions deploy json_in_out --runtime nodejs8 --source https://source.developers.google.com/projects/mot_cz/repos/functions/demo/master/paths/json_in_out --trigger-http
ERROR: (gcloud.functions.deploy) ResponseError: status=[400], code=[Bad Request], message=[The request has errors
Problems:
Source repository URL is invalid https://source.developers.google.com/projects/mot_cz/repos/functions/demo/master/paths/json_in_out does not match the expected pattern
Run Code Online (Sandbox Code Playgroud)

google-cloud-platform google-cloud-repository google-cloud-functions

5
推荐指数
1
解决办法
2044
查看次数

bash脚本:如何在if语句中使用数组元素

最简单的脚本:

#!/bin/bash

myarray=("abc" "bcd" "cde")
 
if ${myaaray[0]} = "abc" ;
then
 echo "abc"
fi
Run Code Online (Sandbox Code Playgroud)

我收到:

./a.sh: line 5: =: command not found
Run Code Online (Sandbox Code Playgroud)

bash

2
推荐指数
1
解决办法
815
查看次数