【发布时间】:2018-08-08 16:40:58
【问题描述】:
我在 appcenter 上的预构建脚本有问题。 Appcenter 使用 bash 作为预构建脚本。我想在我的 api.js 文件中将“qa.api”更改为“beta.api”。
我尝试了以下方法,但似乎不起作用:
#!/usr/bin/env bash
if [ "$APPCENTER_BRANCH" != "master" ];
then
cd App/Services/
echo "changing QA API to Production API (beta)"
sed -i 's/qa.api/beta.api/g' Api.js
fi
所以我简化了它,但它仍然不起作用:
#!/usr/bin/env bash
cd App/Services/
sed -i 's/qa.api/beta.api/g' Api.js`
有什么想法吗?
【问题讨论】:
-
用绝对路径替换
App/Services/? -
没用.. ;(
-
这可能会有所帮助:How to debug a bash script?
标签: bash visual-studio-app-center