Change drone config to extract version in alpine container

This commit is contained in:
Harald Kube 2021-03-13 15:32:07 +01:00
parent 843fda81d1
commit 9633b7cca8

View file

@ -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