From 2c4cfd6d3df3e8ce00b7063a2acf0ee45ee3c82a Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Mon, 9 Dec 2019 06:13:40 +0300 Subject: [PATCH] Version 1.14.1-dev (#2047) --- README.md | 2 +- code/espurna/config/version.h | 2 +- pre-commit | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5dac2b85..c05e83c7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ESPurna ("spark" in Catalan) is a custom firmware for ESP8285/ESP8266 based smart switches, lights and sensors. It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. -[![version](https://img.shields.io/badge/version-1.14.0-brightgreen.svg)](CHANGELOG.md) +[![version](https://img.shields.io/badge/version-1.14.1--dev-brightgreen.svg)](CHANGELOG.md) [![branch](https://img.shields.io/badge/branch-dev-orange.svg)](https://github.com/xoseperez/espurna/tree/dev/) [![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE) [![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna) diff --git a/code/espurna/config/version.h b/code/espurna/config/version.h index 28480ced..a8c53925 100644 --- a/code/espurna/config/version.h +++ b/code/espurna/config/version.h @@ -1,5 +1,5 @@ #define APP_NAME "ESPURNA" -#define APP_VERSION "1.14.0" +#define APP_VERSION "1.14.1-dev" #define APP_AUTHOR "xose.perez@gmail.com" #define APP_WEBSITE "http://tinkerman.cat" #define CFG_VERSION 3 diff --git a/pre-commit b/pre-commit index 896d4b1b..b100b3dd 100755 --- a/pre-commit +++ b/pre-commit @@ -18,6 +18,7 @@ import os import re import string import sys +import argparse from subprocess import call, check_output try: @@ -104,14 +105,22 @@ TEMPLATES = { README = "README.md" if __name__ == "__main__": - base = os.getcwd() + base = os.getcwd() user, repo = git_parse_remote() + + parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument("-b", "--branch", help="git branch name", default=git_branch()) + parser.add_argument("-u", "--user", help="git user name", default=user) + parser.add_argument("-r", "--repo", help="git repo name", default=repo) + parser.add_argument("-v", "--version", help="ESPurna version", default=espurna_get_version(base)) + args = parser.parse_args() + fmt = { - "USER": user, - "REPO": repo, - "BRANCH": git_branch(), - "VERSION": espurna_get_version(base), + "USER": args.user, + "REPO": args.repo, + "BRANCH": args.branch, + "VERSION": args.version } formatter = CustomFormatter()