fix delete list method
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
tqcq 2023-11-16 19:43:04 +08:00
parent 02710657a9
commit aa68f8bbd4
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,9 @@
kind: template kind: template
load: build.yaml load: build.yaml
data: data:
default_build_types:
- Debug
- Release
builds: builds:
- image_name: linux-x64 - image_name: linux-x64
- image_name: linux-x86 - image_name: linux-x86

View File

@ -2,6 +2,7 @@ kind: pipeline
type: docker type: docker
name: default name: default
steps: steps:
{{ $default_build_types := .input.default_build_types }}
{{ range .input.builds }} {{ range .input.builds }}
{{ $image_name := .image_name }} {{ $image_name := .image_name }}
- name: build {{ .image_name }} - name: build {{ .image_name }}
@ -10,7 +11,7 @@ steps:
{{ if .build_types }} {{ if .build_types }}
{{ $build_types := .build_types }} {{ $build_types := .build_types }}
{{ else }} {{ else }}
{{ $build_types := list Debug Release }} {{ $build_types := $default_build_types }}
{{ end }} {{ end }}
{{ range $build_types }} {{ range $build_types }}
- cmake . -Bbuild-{{$image_name}}-{{.}} -DCMAKE_BUILD_TYPE={{.}} - cmake . -Bbuild-{{$image_name}}-{{.}} -DCMAKE_BUILD_TYPE={{.}}
@ -22,3 +23,7 @@ steps:
image: alpine image: alpine
commands: commands:
- ls -l build-* - ls -l build-*
depends_on:
{{ range .input.builds }}
- build {{ .image_name }}
{{ end }}