带有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/

  - @R_902_5025@ager --version

  - yes | @R_902_5025@ager --sdk_root=${ANDROID_HOME} --licenses
  - @R_902_5025@ager --sdk_root=${ANDROID_HOME} "platforms;android-${ANDROID_COMPILE_SDK}"
  - @R_902_5025@ager --sdk_root=${ANDROID_HOME} "platform-tools"
  - @R_902_5025@ager --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 (将#修改为@)