如何解决带有gitlab-runner的Android项目的Config .gitlab-ci.yml文件在Window中运行
我正在为我的Android项目配置.yml文件。我想使用自己的Runner(在Windows本地运行),但是找不到正确的命令
这是我的文件
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "29"
ANDROID_BUILD_TOOLS: "29.0.3"
ANDROID_SDK_TOOLS: "6514223"
before_script:
- set ANDROID_HOME="${PWD}/android-home"
- install -d $ANDROID_HOME
- wget --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-win-${ANDROID_SDK_TOOLS}_latest.zip
- pushd $ANDROID_HOME
- unzip -d cmdline-tools cmdline-tools.zip
- popd
- set PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/tools/bin/
- sdkmanager --version
- yes | sdkmanager --sdk_root=${ANDROID_HOME} --licenses
- sdkmanager --sdk_root=${ANDROID_HOME} "platforms;android-${ANDROID_COMPILE_SDK}"
- sdkmanager --sdk_root=${ANDROID_HOME} "platform-tools"
- sdkmanager --sdk_root=${ANDROID_HOME} "build-tools;${ANDROID_BUILD_TOOLS}"
stages:
- build
assembleDebug:
interruptible: true
stage: build
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/
这是我使用GitLab时的错误
install : The term 'install' is not recognized as the name of a cmdlet,function,script file,or operable program.
Check the spelling of the name,or if a path was included,verify that the path is correct and try again.
我知道这是因为我的.yml文件正在使用Linux命令,但是我不知道如何替换它。有人有Window的配置文件吗?谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。