-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathappveyor.yml
561 lines (550 loc) · 19.3 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
image:
- macos
- Ubuntu
version: 1.11.1.{build}
branches:
only:
- master
only_commits:
files:
- trigger
- appveyor.yml
environment:
GOVERSION: 1.22.5
matrix:
- GOOS: android
GOARCH: arm
CGO_ENABLED: 1
GOARM: 7
PREFIX: android-arm
SUFFIX:
HOST: linux
- GOOS: android
GOARCH: arm64
CGO_ENABLED: 1
PREFIX: android-aarch64
SUFFIX:
HOST: linux
- GOOS: android
GOARCH: 386
CGO_ENABLED: 1
PREFIX: android-386
SUFFIX:
HOST: linux
- GOOS: android
GOARCH: amd64
CGO_ENABLED: 1
PREFIX: android-amd64
SUFFIX:
HOST: linux
- GOOS: android
GOARCH: arm
CGO_ENABLED: 1
GOARM: 7
PREFIX: android-arm-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: android
GOARCH: arm64
CGO_ENABLED: 1
PREFIX: android-aarch64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: android
GOARCH: 386
CGO_ENABLED: 1
PREFIX: android-386-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: android
GOARCH: amd64
CGO_ENABLED: 1
PREFIX: android-amd64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: windows
GOARCH: amd64
PREFIX: windows-amd64
SUFFIX: .exe
HOST: linux
- GOOS: windows
GOARCH: arm
PREFIX: windows-arm
SUFFIX: .exe
HOST: linux
- GOOS: windows
GOARCH: arm64
PREFIX: windows-arm64
SUFFIX: .exe
HOST: linux
- GOOS: windows
GOARCH: arm
PREFIX: windows-arm-lite
SUFFIX: .exe
HOST: linux
LITE: 1
- GOOS: windows
GOARCH: arm64
PREFIX: windows-arm64-lite
SUFFIX: .exe
HOST: linux
LITE: 1
- GOOS: darwin
GOARCH: arm64
CGO_ENABLED: 1
PREFIX: darwin-universal
SUFFIX:
HOST: darwin
- GOOS: darwin
GOARCH: arm64
CGO_ENABLED: 1
PREFIX: darwin-universal-lite
SUFFIX:
HOST: darwin
LITE: 1
- GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
PREFIX: linux-amd64
SUFFIX:
HOST: linux
- GOOS: freebsd
GOARCH: amd64
PREFIX: freebsd-amd64
SUFFIX:
HOST: linux
- GOOS: netbsd
GOARCH: amd64
PREFIX: netbsd-amd64
SUFFIX:
HOST: linux
- GOOS: openbsd
GOARCH: amd64
PREFIX: openbsd-amd64
SUFFIX:
HOST: linux
- GOOS: dragonfly
GOARCH: amd64
PREFIX: dragonfly-amd64
SUFFIX:
HOST: linux
- GOOS: solaris
GOARCH: amd64
PREFIX: solaris-amd64
SUFFIX:
HOST: linux
- GOOS: illumos
GOARCH: amd64
PREFIX: illumos-amd64
SUFFIX:
HOST: linux
- GOOS: windows
GOARCH: 386
PREFIX: windows-386
SUFFIX: .exe
HOST: linux
- GOOS: linux
GOARCH: 386
CGO_ENABLED: 0
PREFIX: linux-386
SUFFIX:
HOST: linux
- GOOS: freebsd
GOARCH: 386
PREFIX: freebsd-386
SUFFIX:
HOST: linux
- GOOS: netbsd
GOARCH: 386
PREFIX: netbsd-386
SUFFIX:
HOST: linux
- GOOS: openbsd
GOARCH: 386
PREFIX: openbsd-386
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: arm
GOARM: 5
PREFIX: linux-armv5
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: arm
GOARM: 6
PREFIX: linux-armv6
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: arm
GOARM: 7
PREFIX: linux-armv7
SUFFIX:
HOST: linux
- GOOS: freebsd
GOARCH: arm
PREFIX: freebsd-arm
SUFFIX:
HOST: linux
- GOOS: netbsd
GOARCH: arm
PREFIX: netbsd-arm
SUFFIX:
HOST: linux
- GOOS: openbsd
GOARCH: arm
PREFIX: openbsd-arm
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: arm64
PREFIX: linux-arm64
SUFFIX:
HOST: linux
- GOOS: freebsd
GOARCH: arm64
PREFIX: freebsd-arm64
SUFFIX:
HOST: linux
- GOOS: netbsd
GOARCH: arm64
PREFIX: netbsd-arm64
SUFFIX:
HOST: linux
- GOOS: openbsd
GOARCH: arm64
PREFIX: openbsd-arm64
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: ppc64
PREFIX: linux-ppc64
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: ppc64le
PREFIX: linux-ppc64le
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mips64
GOMIPS: hardfloat
PREFIX: linux-mips64-hardfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mips64
GOMIPS: softfloat
PREFIX: linux-mips64-softfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mips64le
GOMIPS: hardfloat
PREFIX: linux-mips64le-hardfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mips64le
GOMIPS: softfloat
PREFIX: linux-mips64le-softfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mips
GOMIPS: hardfloat
PREFIX: linux-mips-hardfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mips
GOMIPS: softfloat
PREFIX: linux-mips-softfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mipsle
GOMIPS: hardfloat
PREFIX: linux-mipsle-hardfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: mipsle
GOMIPS: softfloat
PREFIX: linux-mipsle-softfloat
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: s390x
PREFIX: linux-s390x
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: riscv64
PREFIX: linux-riscv64
SUFFIX:
HOST: linux
- GOOS: linux
GOARCH: riscv64
PREFIX: linux-riscv64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: arm
GOARM: 5
PREFIX: linux-armv5-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: arm
GOARM: 6
PREFIX: linux-armv6-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: arm
GOARM: 7
PREFIX: linux-armv7-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: freebsd
GOARCH: arm
PREFIX: freebsd-arm-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: netbsd
GOARCH: arm
PREFIX: netbsd-arm-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: openbsd
GOARCH: arm
PREFIX: openbsd-arm-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: arm64
PREFIX: linux-arm64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: freebsd
GOARCH: arm64
PREFIX: freebsd-arm64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: netbsd
GOARCH: arm64
PREFIX: netbsd-arm64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: openbsd
GOARCH: arm64
PREFIX: openbsd-arm64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: ppc64
PREFIX: linux-ppc64-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: ppc64le
PREFIX: linux-ppc64le-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mips64
GOMIPS: hardfloat
PREFIX: linux-mips64-hardfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mips64
GOMIPS: softfloat
PREFIX: linux-mips64-softfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mips64le
GOMIPS: hardfloat
PREFIX: linux-mips64le-hardfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mips64le
GOMIPS: softfloat
PREFIX: linux-mips64le-softfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mips
GOMIPS: hardfloat
PREFIX: linux-mips-hardfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mips
GOMIPS: softfloat
PREFIX: linux-mips-softfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mipsle
GOMIPS: hardfloat
PREFIX: linux-mipsle-hardfloat-lite
SUFFIX:
HOST: linux
LITE: 1
- GOOS: linux
GOARCH: mipsle
GOMIPS: softfloat
PREFIX: linux-mipsle-softfloat-lite
SUFFIX:
HOST: linux
LITE: 1
matrix:
exclude:
- image: macos
HOST: linux
- image: Ubuntu
HOST: darwin
clone_depth: 1
# scripts that run after cloning repository
install:
- curl -O -L "https://storage.googleapis.com/golang/go$GOVERSION.$HOST-amd64.tar.gz"
- tar xzf "go$GOVERSION.$HOST-amd64.tar.gz"
- export GOROOT=$(pwd)/go
- export PATH=$(pwd)/go/bin:$PATH
- if [ "$HOST" = "darwin" ]; then brew install gnu-sed; export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export NDK_VERSION=r26d; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ARCH=`uname -m`; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_NDK_HOME=$APPVEYOR_BUILD_FOLDER/.android/android-ndk-$NDK_VERSION; if [ ! -d "$ANDROID_NDK_HOME" ]; then mkdir -p $ANDROID_NDK_HOME; fi; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then pushd $APPVEYOR_BUILD_FOLDER/.android; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then curl -L http://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux.zip -o android-ndk-$NDK_VERSION-linux.zip; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then unzip -q android-ndk-$NDK_VERSION-linux.zip; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then ls -l; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then popd; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_ARM_CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi29-clang; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_ARM_CXX=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi29-clang++; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_ARM_STRIP=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_X86_CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android29-clang; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_X86_CXX=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android29-clang++; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_X86_STRIP=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android-strip; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_AARCH64_CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_AARCH64_CXX=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_AARCH64_STRIP=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_X64_CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android29-clang; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_X64_CXX=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android29-clang++; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export ANDROID_X64_STRIP=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-strip; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" -a "$GOARCH" = "arm" ]; then export CC=$ANDROID_ARM_CC; CXX=$ANDROID_ARM_CXX; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" -a "$GOARCH" = "arm64" ]; then export CC=$ANDROID_AARCH64_CC; CXX=$ANDROID_AARCH64_CXX; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" -a "$GOARCH" = "386" ]; then export CC=$ANDROID_X86_CC; CXX=$ANDROID_X86_CXX; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" -a "$GOARCH" = "amd64" ]; then export CC=$ANDROID_X64_CC; CXX=$ANDROID_X64_CXX; fi
- if [ "$GOOS" = "android" -a "$HOST" = "linux" ]; then export PATH=$ANDROID_NDK_HOME:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}; fi
- export GO111MODULE=on
- git clone --depth=1 https://github.com/coredns/coredns.git
- git clone --depth=1 https://github.com/leiless/dnsredir.git
- if [ "$HOST" = "darwin" ]; then cd dnsredir/pf && sudo ./download-pf-headers.sh; ls -l /usr/local/include/net; ls -l /usr/local/include/libkern; fi
- if [ "$HOST" = "darwin" -a "$(sw_vers -productVersion | cut -d'.' -f1)" = 10 ]; then cd /Library/Developer/CommandLineTools/SDKs; sudo rm MacOSX.sdk; sudo ln -s MacOSX11.1.sdk MacOSX.sdk; sudo rm -rf MacOSX10.15.sdk; ls -l; fi
# scripts that run before build
before_build:
- go env
- go version
# custom build scripts
build_script:
- cd "$APPVEYOR_BUILD_FOLDER/coredns"
- git apply "$APPVEYOR_BUILD_FOLDER/forward.go.patch"
- git apply "$APPVEYOR_BUILD_FOLDER/forward-setup.go.patch"
- sed -i.bak 's|forward:forward|fallback:github.com/missdeer/fallback\ndnsredir:github.com/leiless/dnsredir\nforward:forward\nproxy:github.com/missdeer/proxy\nhttps:github.com/v-byte-cpu/coredns-https|g' plugin.cfg
- sed -i.bak 's|hosts:hosts|ads:github.com/missdeer/ads\nblocklist:github.com/relekang/coredns-blocklist\nhosts:hosts|g' plugin.cfg
- sed -i.bak 's|rewrite:rewrite|rewrite:rewrite\nbogus:github.com/missdeer/bogus\nipset:github.com/missdeer/ipset|g' plugin.cfg
- sed -i.bak 's|cache:cache|cache:cache\nredisc:github.com/missdeer/redis|g' plugin.cfg
- echo "replace (" >> go.mod
- echo " github.com/leiless/dnsredir => ../dnsredir" >> go.mod
- echo ")" >> go.mod
- sed -i.bak '/azure/d' plugin.cfg
- sed -i.bak '/route53/d' plugin.cfg
- sed -i.bak '/trace/d' plugin.cfg
- sed -i.bak '/etcd/d' plugin.cfg
- sed -i.bak '/clouddns/d' plugin.cfg
- sed -i.bak '/k8s_external/d' plugin.cfg
- sed -i.bak '/kubernetes/d' plugin.cfg
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/geoip/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/nsid/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/debug/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/trace/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/autopath/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/erratic/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/metadata/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/cancel/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/pprof/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/dnstap/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/dns64/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/acl/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/chaos/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/dnssec/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/secondary/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/loop/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/grpc/d' plugin.cfg; fi
- if [ "$LITE"x = "1"x ]; then sed -i.bak '/sign/d' plugin.cfg; fi
- cat plugin.cfg
- if [ "$HOST" = "darwin" ]; then env CGO_ENABLED=1 GOOS=$HOST GOARCH=amd64 go generate coredns.go; else env CGO_ENABLED=0 GOOS=$HOST GOARCH=amd64 go generate coredns.go; fi
- if [ "$HOST" = "darwin" ]; then env CGO_ENABLED=1 GOOS=$HOST GOARCH=amd64 go get; else env CGO_ENABLED=0 GOOS=$HOST GOARCH=amd64 go get; fi
- if [ "$HOST" = "darwin" ]; then env GOARCH=amd64 make CGO_ENABLED=$CGO_ENABLED; mv coredns coredns.amd64; env GOARCH=arm64 make CGO_ENABLED=$CGO_ENABLED; mv coredns coredns.arm64; lipo -create -output coredns coredns.amd64 coredns.arm64; else make CGO_ENABLED=$CGO_ENABLED; fi
- if [ "$GOOS" = "windows" ]; then file ./coredns.exe; else file ./coredns; fi
- if [ "$GOOS" = "linux" -a "$HOST" = "linux" -a "$GOARCH" = "amd64" ]; then ./coredns -plugins; fi
- if [ "$GOOS" = "darwin" ]; then ./coredns -plugins; fi
- cd ..
# scripts that run after build
after_build:
- mkdir -p "distrib/coredns-$PREFIX"
- cp "$APPVEYOR_BUILD_FOLDER/coredns/coredns" "distrib/coredns-$PREFIX/coredns$SUFFIX"
- cp "$APPVEYOR_BUILD_FOLDER/coredns/coredns" "distrib/coredns$SUFFIX"
- if [ "$GOOS" = "windows" ]; then cp "$APPVEYOR_BUILD_FOLDER/coredns.exe.manifest" "distrib/coredns-$PREFIX/coredns.exe.manifest"; fi
- if [ "$GOOS" = "linux" ]; then cp "$APPVEYOR_BUILD_FOLDER/setcap.sh" "distrib/coredns-$PREFIX/setcap.sh"; fi
- cd distrib
- curl -sSL https://gist.githubusercontent.com/missdeer/5c7c82b5b67f8afb41cfd43d51b82c2d/raw/gen_Corefile.sh | bash
- mv Corefile "coredns-$PREFIX/Corefile"
- zip -r "coredns-$PREFIX.zip" "coredns-$PREFIX"
- zip -r coredns.zip "coredns$SUFFIX"
- md5sum "coredns$SUFFIX"
- sha1sum "coredns$SUFFIX"
- sha224sum "coredns$SUFFIX"
- sha256sum "coredns$SUFFIX"
- sha384sum "coredns$SUFFIX"
- sha512sum "coredns$SUFFIX"
- md5sum coredns.zip
- sha1sum coredns.zip
- sha224sum coredns.zip
- sha256sum coredns.zip
- sha384sum coredns.zip
- sha512sum coredns.zip
artifacts:
- path: distrib/coredns-$PREFIX.zip
name: full_package
- path: distrib/coredns.zip
name: exe_only