问题描述
在gitlab ci中,我设法构建一个解决方案,然后需要构建一个安装程序。它失败,并出现未知的选项错误。
在设置阶段,我会收到此错误:
Inno Setup 6命令行编译器
(C)1997-2020 Jordan Russell版权所有。保留所有权利。
部分版权所有(C)2000-2020 Martijn Laan。保留所有权利。
部分版权所有(C)2001-2004 Alex Yackimoff。保留所有权利。
未知选项:-c
未知选项:-c
Inno Setup 6命令行编译器
版权所有(C)1997-2020 Jordan Russell。保留所有权利。
部分版权所有(C)2000-2020 Martijn Laan。保留所有权利。
部分版权所有(C)2001-2004 Alex Yackimoff。保留所有权利。
这是我的.gitlab-ci.yml文件:
stages:
- build
- setup
build:
image: mono:latest
stage: build
script:
- 'nuget restore'
- 'MONO_IOMAP=case msbuild /t:Build /p:Configuration=Release;Platform="Any cpu"'
artifacts:
paths:
- MyApp/bin/Release/
- MyApp/Inno/
setup:
image: amake/innosetup
stage: setup
script:
- 'compil32 /cc "Path/To/MyAppSetup.iss"'
#- 'iscc "Path/To/MyAppSetup.iss"'
解决方法
由于我不知道问题出在哪里,所以我决定将docker映像用于innosetup:
我需要在 docker 步骤中使用dind
和docker docker。
build:
stage: build
image: docker:18
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- docker run --rm -v "$PWD:/work" amake/innosetup /dMyAppVersion=$MY_VERSION_NO "Path/To/MyAppSetup.iss"
artifacts:
paths:
- Path/To/bin/MyApp-*-Setup.exe