Browse Source

Always use -dev suffix

refactor-terminal
Max Prokhorov 6 years ago
parent
commit
c0b4ffac13
2 changed files with 17 additions and 7 deletions
  1. +16
    -6
      code/build.sh
  2. +1
    -1
      code/espurna/config/version.h

+ 16
- 6
code/build.sh View File

@ -19,14 +19,24 @@ stat_bytes() {
# Script settings # Script settings
destination=../firmware destination=../firmware
version=$(grep APP_VERSION espurna/config/version.h | awk '{print $3}' | sed 's/"//g')
version_file=espurna/config/version.h
version=$(grep -E '^#define APP_VERSION' $version_file | awk '{print $3}' | sed 's/"//g')
if is_git; then
if ${TRAVIS:-false}; then
git_revision=${TRAVIS_COMMIT::7}
git_tag=${TRAVIS_TAG}
elif is_git; then
git_revision=$(git rev-parse --short HEAD) git_revision=$(git rev-parse --short HEAD)
git_version=${version}-${git_revision}
git_tag=$(git tag --contains HEAD)
else else
git_revision=
git_version=$version
git_revision=unknown
git_tag=
fi
if [ ! -z $git_tag ]; then
version=${version/-dev}
sed -i -e "s@$version-dev@$version@" $version_file
trap "git checkout -- $version_file" EXIT
fi fi
par_build=false par_build=false
@ -139,7 +149,7 @@ shift $((OPTIND-1))
# Welcome # Welcome
echo "--------------------------------------------------------------" echo "--------------------------------------------------------------"
echo "ESPURNA FIRMWARE BUILDER" echo "ESPURNA FIRMWARE BUILDER"
echo "Building for version ${git_version}"
echo "Building for version ${version}" ${git_revision:+($git_revision)}
# Environments to build # Environments to build
environments=$@ environments=$@


+ 1
- 1
code/espurna/config/version.h View File

@ -1,5 +1,5 @@
#define APP_NAME "ESPURNA" #define APP_NAME "ESPURNA"
#define APP_VERSION "1.13.4"
#define APP_VERSION "1.13.4-dev"
#define APP_AUTHOR "xose.perez@gmail.com" #define APP_AUTHOR "xose.perez@gmail.com"
#define APP_WEBSITE "http://tinkerman.cat" #define APP_WEBSITE "http://tinkerman.cat"
#define CFG_VERSION 3 #define CFG_VERSION 3

Loading…
Cancel
Save