From 7bc8c5b967e1a546421d7e6040a5bbaddf1497e7 Mon Sep 17 00:00:00 2001 From: Jacob Kiers Date: Wed, 7 Sep 2022 22:15:58 +0200 Subject: [PATCH] Bring back Windows support Signed-off-by: Jacob Kiers --- .drone.jsonnet | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 8f88de8..3a8143f 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,13 +1,15 @@ local archs = [ { target: 'aarch64-unknown-linux-gnu', short: 'arm64-gnu' }, { target: 'aarch64-unknown-linux-musl', short: 'arm64-musl' }, - // { target: 'x86_64-pc-windows-gnu', short: 'windows-amd64' }, + { target: 'x86_64-pc-windows-gnu', short: 'windows-amd64' }, { target: 'x86_64-unknown-linux-gnu', short: 'amd64-gnu' }, { target: 'x86_64-unknown-linux-musl', short: 'amd64-musl' }, ]; local getStepName(arch) = 'build ' + arch.short; +local getExeName(arch) = if std.startsWith(arch.short, 'windows') then '.exe' else ''; + local add_build_steps() = [ { name: getStepName(arch), @@ -26,7 +28,7 @@ local add_build_steps() = [ 'echo Hello World from Jsonnet on ' + arch.target + '!', 'cross build --release --target ' + arch.target, 'rm -rf target/' + arch.target + '/release/{build,deps,examples,incremental}', - 'cp target/' + arch.target + '/release/drone-test artifacts/drone-test-' + arch.short, + 'cp target/' + arch.target + '/release/drone-test' + getExeName(arch) + ' artifacts/drone-test-' + arch.short + getExeName(arch), ], environment: { CROSS_REMOTE: true,