mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-03 15:04:17 +01:00
Multiple ways to specify version string through environment variables:
- `ESPURNA_BUILD_FULL_VERSION` to set full version string
By default it is empty, and the version is combined using the values specified below
- `ESPURNA_BUILD_VERSION` to modify the first part of the version string (1.15.0-dev)
By default, uses espurna/config/version.h APP_VERSION value
- `ESPURNA_BUILD_REVISION` to specify revision part of the version string
For example 12345678, which is expanded as either .git12345678 or -git12345678
(depending on whether the version string contains hyphen)
By default, use git to retrieve the first 8 characters of the current HEAD SHA value
- `ESPURNA_BUILD_VERSION_SUFFIX` to specify build metadata part of the string
For example nightly20210607, which is added to the full version as 1.15.0-dev+nightly20210607
Empty by defauld
Adds -t build-and-copy which uses the values above to copy firmware.bin, configurable with:
- `ESPURNA_BUILD_NAME` to set the suffix of the filename.
By default, uses the $PIOENV (aka the string after the env: in the .ini file)
- `ESPURNA_BUILD_DESTINATION` to specify where to copy the .bin files
By default, uses $PROJECT_DIR
Resulting file is stored at:
${ESPURNA_BUILD_DESTINATION}/${ESPURNA_BUILD_FULL_VERSION}/espurna-${ESPURNA_BUILD_FULL_VERSION}-${ESPURNA_BUILD_NAME}.bin
In addition, modify generate_release_sh.py to use the new environment variables.
43 lines
1.5 KiB
Python
43 lines
1.5 KiB
Python
# coding=utf-8
|
|
#
|
|
# Original extra_scripts.py
|
|
# Copyright (C) 2016-2019 by Xose Pérez <xose dot perez at gmail dot com>
|
|
#
|
|
# ldscripts, lwip patching, updated postmortem flags and git support
|
|
# Copyright (C) 2019-2021 by Maxim Prokhorov <prokhorov dot max at outlook dot com>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
from .build import firmware_destination, app_add_target_build_and_copy
|
|
from .checks import check_cppcheck, check_printsize
|
|
from .flags import app_inject_flags
|
|
from .float_support import remove_float_support
|
|
from .ldscripts import ldscripts_inject_libpath
|
|
from .postmortem import dummy_ets_printf
|
|
from .version import app_inject_version, app_full_version_for_env
|
|
|
|
__all__ = [
|
|
"app_add_target_build_and_copy",
|
|
"app_full_version_for_env",
|
|
"app_inject_flags",
|
|
"app_inject_version",
|
|
"app_version",
|
|
"check_cppcheck",
|
|
"check_printsize",
|
|
"dummy_ets_printf",
|
|
"firmware_destination",
|
|
"ldscripts_inject_libpath",
|
|
"remove_float_support",
|
|
]
|