update info formatting

This commit is contained in:
Mateusz Faderewski 2023-03-04 12:13:08 +01:00
parent 4ce9086240
commit 6dd64d1db1
3 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ build_update () {
if [ ! -z "${GIT_BRANCH}" ]; then GIT_INFO+=$'\n'"branch: $GIT_BRANCH"; fi if [ ! -z "${GIT_BRANCH}" ]; then GIT_INFO+=$'\n'"branch: $GIT_BRANCH"; fi
if [ ! -z "${GIT_TAG}" ]; then GIT_INFO+=$'\n'"tag: $GIT_TAG"; fi if [ ! -z "${GIT_TAG}" ]; then GIT_INFO+=$'\n'"tag: $GIT_TAG"; fi
if [ ! -z "${GIT_SHA}" ]; then GIT_INFO+=$'\n'"sha: $GIT_SHA"; fi if [ ! -z "${GIT_SHA}" ]; then GIT_INFO+=$'\n'"sha: $GIT_SHA"; fi
if [ ! -z "${GIT_MESSAGE}" ]; then GIT_INFO+=$'\n'"commit msg: $GIT_MESSAGE"; fi if [ ! -z "${GIT_MESSAGE}" ]; then GIT_INFO+=$'\n'"msg: $GIT_MESSAGE"; fi
python3 update.py \ python3 update.py \
--git "$GIT_INFO" \ --git "$GIT_INFO" \
--mcu ../controller/build/app/app.bin \ --mcu ../controller/build/app/app.bin \

View File

@ -1,6 +1,6 @@
mod debug; mod debug;
mod n64; mod n64;
pub mod sc64; // TODO: delete pub pub mod sc64;
use chrono::Local; use chrono::Local;
use clap::{Args, Parser, Subcommand, ValueEnum}; use clap::{Args, Parser, Subcommand, ValueEnum};

View File

@ -220,8 +220,8 @@ if __name__ == "__main__":
hostname = platform.node() hostname = platform.node()
creation_datetime = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S') creation_datetime = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
update_info = '\n'.join([ update_info = '\n'.join([
f'build system: {hostname}', f'builder: {hostname}',
f'creation datetime: {creation_datetime}', f'created: {creation_datetime}',
]) ])
if (args.git): if (args.git):
update_info += args.git update_info += args.git