handle empty suffix correctly

This commit is contained in:
andreas 2023-09-05 19:21:53 +02:00
parent 0709e92b6f
commit f6cbcecb78
1 changed files with 9 additions and 4 deletions

View File

@ -49,10 +49,15 @@ jobs:
name: "rename" name: "rename"
working_directory: ".pio/build/<< pipeline.parameters.environment >>" working_directory: ".pio/build/<< pipeline.parameters.environment >>"
command: "mv firmware.bin << pipeline.parameters.environment >><< pipeline.parameters.suffix >>-update.bin" command: "mv firmware.bin << pipeline.parameters.environment >><< pipeline.parameters.suffix >>-update.bin"
- run: - when:
name: "rename2" condition:
working_directory: ".pio/build/<< pipeline.parameters.environment >>" not:
command: "mv << pipeline.parameters.environment >>-all.bin << pipeline.parameters.environment >><< pipeline.parameters.suffix >>-all.bin" equal: [ << pipeline.parameters.suffix >> ,""]
steps:
- run:
name: "rename2"
working_directory: ".pio/build/<< pipeline.parameters.environment >>"
command: "mv << pipeline.parameters.environment >>-all.bin << pipeline.parameters.environment >><< pipeline.parameters.suffix >>-all.bin"
- run: - run:
name: "compress" name: "compress"
working_directory: ".pio/build/<< pipeline.parameters.environment >>" working_directory: ".pio/build/<< pipeline.parameters.environment >>"