Skip to content

Commit

Permalink
Add global publish option to package
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Mihálek <aenniw@gmail.com>
  • Loading branch information
aenniw committed Feb 16, 2019
1 parent 9c6c9da commit 94852b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ mkdir ./target

TAG=`git tag -l --points-at HEAD`
for PROJECT_BIN in ./*/.pioenvs/*/firmware.elf; do
PROJECT_NAME=${PROJECT_BIN%${PROJECT_BIN#*/*/}} && \
PROJECT_NAME=${PROJECT_BIN%${PROJECT_BIN#*/*/}} && \
PROJECT_NAME=${PROJECT_NAME%*/} && \
PROJECT_NAME=${PROJECT_NAME#./*}
BOARD_NAME=${PROJECT_BIN%*/*} && \
BOARD_NAME=${BOARD_NAME##*/} && \

if echo ${TAG:-${PROJECT_NAME}} | grep -iq $PROJECT_NAME; then
if echo ${TAG:-${PROJECT_NAME}} | grep -iq $PROJECT_NAME || \
echo ${TAG} | grep -iqv '-' ; then
cp ${PROJECT_BIN} ./target/${PROJECT_NAME}-${BOARD_NAME}.elf
fi
done

0 comments on commit 94852b8

Please sign in to comment.