Skip to content

Commit b68798e

Browse files
committed
scripts/before_deploy: script to prepare builds in travis
1 parent 8a13cdb commit b68798e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/before_deploy

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
# Project home: https://github.com/puuu/MQTT433gateway/
3+
# Script to prepare MQTT433gateway binaries for deploying
4+
# Copyright (c) 2018 Puuu
5+
# Permission to copy and modify is granted under the MIT license
6+
7+
# Skipping non-tagged commit
8+
[ -z "$(git tag --contains)" ] && exit 0
9+
10+
VERSION=$(git describe --abbrev=8 --dirty --always --tags)
11+
12+
echo "Preparing release for tagged version: $VERSION"
13+
14+
for file in .pioenvs/*/firmware.bin; do
15+
env=$(echo "$file" | cut -f2 -d'/')
16+
cp "$file" "dist/mqtt433gateway_${env}-${VERSION}.bin"
17+
done

0 commit comments

Comments
 (0)