Change drone config to extract version in alpine container
This commit is contained in:
parent
843fda81d1
commit
9633b7cca8
1 changed files with 9 additions and 17 deletions
26
.drone.yml
26
.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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue