From d5f76827b9b53ba42b96779f3354e2d1cf32380f Mon Sep 17 00:00:00 2001 From: dzbaker Date: Thu, 17 Aug 2023 08:39:13 -0400 Subject: [PATCH 1/5] Create icbundle.yml --- .github/workflows/icbundle.yml | 73 ++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/icbundle.yml diff --git a/.github/workflows/icbundle.yml b/.github/workflows/icbundle.yml new file mode 100644 index 0000000..6ff11fa --- /dev/null +++ b/.github/workflows/icbundle.yml @@ -0,0 +1,73 @@ +name: Integration Candidate Bundle Generation + +# Generate Integration Candidate branch for this repository. + +on: + workflow_dispatch: + inputs: + pr_nums: + description: 'The pull request numbers to include (Comma separated)' + required: true + type: string + +jobs: + generate-ic-bundle: + runs-on: ubuntu-latest + steps: + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y w3m + - name: Checkout IC Branch + uses: actions/checkout@v3 + with: + fetch-depth: '0' + ref: main + - name: Rebase IC Branch + run: | + git config user.name "GitHub Actions" + git config user.email "cfs-program@list.nasa.gov" + git pull + git checkout integration-candidate + git rebase main + - name: Merge each PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + prs=$(echo ${{ inputs.pr_nums }} | tr "," "\n") + for pr in $prs + do + src_branch=$(hub pr show -f %H $pr) + pr_title=$(hub pr show -f %t $pr) + commit_msg=$'Merge pull request #'"${pr}"$' from '"${src_branch}"$'\n\n'"${pr_title}" + git fetch origin pull/$pr/head:origin/pull/$pr/head + git merge origin/pull/$pr/head --no-ff -m "$commit_msg" + done + - name: Update Changelog and Version.h files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + rev_num=$(git rev-list v2.5.0-rc4.. --count) + changelog_entry=$'# Changelog\\n\\n## Development Build: v2.5.0-rc4+dev'${rev_num} + prs=$(echo ${{ inputs.pr_nums }} | tr "," "\n") + see_entry=$'\-\ See:' + for pr in $prs + do + pr_title=$(hub pr show -f %t $pr) + changelog_entry="${changelog_entry}"$'\\n- '"${pr_title@Q}" + see_entry="${see_entry}"$' ' + done + changelog_entry="${changelog_entry}\n${see_entry}\n" + sed -ir "s|# Changelog|$changelog_entry|" CHANGELOG.md + + buildnumber_entry=$'#define OS_BUILD_NUMBER '${rev_num} + sed -ir "s|#define OS_BUILD_NUMBER.*|$buildnumber_entry|" fsw/src/ci_lab_version.h + - name: Commit and Push Updates to IC Branch + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + rev_num=$(git rev-list v2.5.0-rc4.. --count) + git add CHANGELOG.md + git add fsw/src/ci_lab_version.h + git commit -m "Updating documentation and version numbers for v2.5.0-rc4+dev${rev_num}" + git push -v origin integration-candidate From d381aeac6ee0453bc9dbbeb4b9c3e59b40a45ac3 Mon Sep 17 00:00:00 2001 From: dzbaker Date: Thu, 17 Aug 2023 08:58:52 -0400 Subject: [PATCH 2/5] Update icbundle.yml --- .github/workflows/icbundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icbundle.yml b/.github/workflows/icbundle.yml index 6ff11fa..2f36878 100644 --- a/.github/workflows/icbundle.yml +++ b/.github/workflows/icbundle.yml @@ -61,7 +61,7 @@ jobs: sed -ir "s|# Changelog|$changelog_entry|" CHANGELOG.md buildnumber_entry=$'#define OS_BUILD_NUMBER '${rev_num} - sed -ir "s|#define OS_BUILD_NUMBER.*|$buildnumber_entry|" fsw/src/ci_lab_version.h + sed -ir "s|#define CI_LAB_BUILD_NUMBER.*|$buildnumber_entry|" fsw/src/ci_lab_version.h - name: Commit and Push Updates to IC Branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From e9a7e66771c0abce220f42d071dfa33728c9d24b Mon Sep 17 00:00:00 2001 From: dzbaker Date: Thu, 17 Aug 2023 09:04:19 -0400 Subject: [PATCH 3/5] Update icbundle.yml --- .github/workflows/icbundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icbundle.yml b/.github/workflows/icbundle.yml index 2f36878..86eccfc 100644 --- a/.github/workflows/icbundle.yml +++ b/.github/workflows/icbundle.yml @@ -60,7 +60,7 @@ jobs: changelog_entry="${changelog_entry}\n${see_entry}\n" sed -ir "s|# Changelog|$changelog_entry|" CHANGELOG.md - buildnumber_entry=$'#define OS_BUILD_NUMBER '${rev_num} + buildnumber_entry=$'#define OS_BUILD_NUMBER '${rev_num}'/*!< Development Build: Number of commits since baseline */' sed -ir "s|#define CI_LAB_BUILD_NUMBER.*|$buildnumber_entry|" fsw/src/ci_lab_version.h - name: Commit and Push Updates to IC Branch env: From 014c9d5527a39c309925a7109422ebb19f7a0563 Mon Sep 17 00:00:00 2001 From: dzbaker Date: Thu, 17 Aug 2023 09:08:47 -0400 Subject: [PATCH 4/5] Update icbundle.yml --- .github/workflows/icbundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/icbundle.yml b/.github/workflows/icbundle.yml index 86eccfc..2a46d0d 100644 --- a/.github/workflows/icbundle.yml +++ b/.github/workflows/icbundle.yml @@ -60,7 +60,7 @@ jobs: changelog_entry="${changelog_entry}\n${see_entry}\n" sed -ir "s|# Changelog|$changelog_entry|" CHANGELOG.md - buildnumber_entry=$'#define OS_BUILD_NUMBER '${rev_num}'/*!< Development Build: Number of commits since baseline */' + buildnumber_entry=$'#define CI_LAB_BUILD_NUMBER '${rev_num}'/*!< Development Build: Number of commits since baseline */' sed -ir "s|#define CI_LAB_BUILD_NUMBER.*|$buildnumber_entry|" fsw/src/ci_lab_version.h - name: Commit and Push Updates to IC Branch env: From 9819046d4459fff7b14171c6e1b8037d5d6a1ae4 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 26 Dec 2023 09:45:41 -0500 Subject: [PATCH 5/5] Fix #145, updating ci_lab to use new versioning system. --- fsw/src/ci_lab_app.c | 6 +++++- fsw/src/ci_lab_app.h | 1 + fsw/src/ci_lab_version.h | 26 ++++++++++++++++---------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/fsw/src/ci_lab_app.c b/fsw/src/ci_lab_app.c index c37b3c6..df5ef9b 100644 --- a/fsw/src/ci_lab_app.c +++ b/fsw/src/ci_lab_app.c @@ -104,6 +104,7 @@ void CI_LAB_TaskInit(void) { int32 status; uint16 DefaultListenPort; + char VersionString[CI_LAB_CFG_MAX_VERSION_STR_LEN]; memset(&CI_LAB_Global, 0, sizeof(CI_LAB_Global)); @@ -172,8 +173,11 @@ void CI_LAB_TaskInit(void) CFE_MSG_Init(CFE_MSG_PTR(CI_LAB_Global.HkTlm.TelemetryHeader), CFE_SB_ValueToMsgId(CI_LAB_HK_TLM_MID), sizeof(CI_LAB_Global.HkTlm)); + CFE_Config_GetVersionString(VersionString, CI_LAB_CFG_MAX_VERSION_STR_LEN, "CI Lab App", + CI_LAB_VERSION, CI_LAB_BUILD_CODENAME, CI_LAB_LAST_OFFICIAL); + CFE_EVS_SendEvent(CI_LAB_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized.%s", - CI_LAB_VERSION_STRING); + VersionString); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/ diff --git a/fsw/src/ci_lab_app.h b/fsw/src/ci_lab_app.h index cb1510e..bfda67a 100644 --- a/fsw/src/ci_lab_app.h +++ b/fsw/src/ci_lab_app.h @@ -29,6 +29,7 @@ #include "common_types.h" #include "osapi.h" #include "cfe.h" +#include "cfe_config.h" #include "ci_lab_mission_cfg.h" #include "ci_lab_platform_cfg.h" diff --git a/fsw/src/ci_lab_version.h b/fsw/src/ci_lab_version.h index 234e7d9..62b31ee 100644 --- a/fsw/src/ci_lab_version.h +++ b/fsw/src/ci_lab_version.h @@ -25,16 +25,22 @@ /* Development Build Macro Definitions */ -#define CI_LAB_BUILD_NUMBER 81 /*!< Development Build: Number of commits since baseline */ -#define CI_LAB_BUILD_BASELINE \ - "v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */ +#define CI_LAB_BUILD_NUMBER 81 /*!< Development Build: Number of commits since baseline */ +#define CI_LAB_BUILD_BASELINE "equuleus-rc1" /*!< Development Build: git tag that is the base for the current development */ +#define CI_LAB_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ +#define CI_LAB_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */ /* * Version Macros, see \ref cfsversions for definitions. */ #define CI_LAB_MAJOR_VERSION 2 /*!< @brief Major version number */ #define CI_LAB_MINOR_VERSION 3 /*!< @brief Minor version number */ -#define CI_LAB_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/ +#define CI_LAB_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/ + +/** + * @brief Last official release. + */ +#define CI_LAB_LAST_OFFICIAL "v2.3.0" /*! * @brief Mission revision. @@ -54,12 +60,12 @@ */ #define CI_LAB_VERSION CI_LAB_BUILD_BASELINE "+dev" CI_LAB_STR(CI_LAB_BUILD_NUMBER) -/*! @brief Development Build Version String. - * @details Reports the current development build's baseline, number, and name. Also includes a note about the latest - * official version. @n See @ref cfsversions for format differences between development and release versions. +/** + * @brief Max Version String length. + * + * Maximum length that a CI Lab version string can be. + * */ -#define CI_LAB_VERSION_STRING \ - " CI Lab App DEVELOPMENT BUILD " CI_LAB_VERSION \ - ", Last Official Release: v2.3.0" /* For full support please use this version */ +#define CI_LAB_CFG_MAX_VERSION_STR_LEN 256 #endif