From 9633b7cca8744b94f062b304a973322ddbb56bd7 Mon Sep 17 00:00:00 2001 From: Harald Kube Date: Sat, 13 Mar 2021 15:32:07 +0100 Subject: [PATCH] Change drone config to extract version in alpine container --- .drone.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 636e212..09944e9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,13 +17,13 @@ steps: # - ls # - ls target - - name: build_test - image: drone_rust:1.50-musl - volumes: - - name: target - path: /drone/src/target - commands: - - cargo build --release + # - name: build_test + # image: drone_rust:1.50-musl + # volumes: + # - name: target + # path: /drone/src/target + # commands: + # - cargo build --release - name: run_test image: drone_rust:1.50-musl @@ -40,25 +40,17 @@ steps: path: /drone/src/target commands: - cargo build --release --target armv7-unknown-linux-musleabihf --features "rppal" - - grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION when: event: tag - - name: show_version + - name: prepare_deployment image: alpine volumes: - name: target path: /drone/src/target commands: - # - grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION + - grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION - cat target/VERSION - - - name: bundle_deployment - image: alpine - volumes: - - name: target - path: /drone/src/target - commands: - cp target/armv7-unknown-linux-musleabihf/release/s0_meter target/s0_meter-armhf-$(cat target/VERSION) when: event: tag