mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Update version number in manifest.yml (#756)
Add automation to update version number in manifest.yml. Also, bring required commits from main.
This commit is contained in:
parent
fe005419f0
commit
0d871946ab
32
.github/scripts/manifest_updater.py
vendored
Executable file
32
.github/scripts/manifest_updater.py
vendored
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import argparse
|
||||
|
||||
THIS_FILE_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
MANIFEST_FILE = os.path.join(THIS_FILE_PATH, '..', '..', 'manifest.yml')
|
||||
|
||||
def update_manifest_file(new_version_number):
|
||||
updated_lines = []
|
||||
with open(MANIFEST_FILE, 'r') as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if line.startswith('version'):
|
||||
updated_lines.append(f'version: "v{new_version_number}"\n')
|
||||
else:
|
||||
updated_lines.append(f'{line}\n')
|
||||
|
||||
with open(MANIFEST_FILE, 'w') as f:
|
||||
f.writelines(updated_lines)
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-v', '--version', required=True, help='New version number.')
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
update_manifest_file(args.version)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
17
.github/workflows/auto-release.yml
vendored
17
.github/workflows/auto-release.yml
vendored
|
@ -63,6 +63,19 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name : Update version number in manifest.yml
|
||||
working-directory: ./local_kernel
|
||||
run: |
|
||||
./.github/scripts/manifest_updater.py -v ${{ github.event.inputs.version_number }}
|
||||
exit $?
|
||||
|
||||
- name : Commit version number change in manifest.yml
|
||||
working-directory: ./local_kernel
|
||||
run: |
|
||||
git add .
|
||||
git commit -m '[AUTO][RELEASE]: Update version number in manifest.yml'
|
||||
git push -u origin ${{ github.event.inputs.version_number }}
|
||||
|
||||
- name: Generate SBOM
|
||||
uses: FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
|
||||
with:
|
||||
|
@ -73,7 +86,7 @@ jobs:
|
|||
working-directory: ./local_kernel
|
||||
run: |
|
||||
git add .
|
||||
git commit -m 'Update SBOM'
|
||||
git commit -m '[AUTO][RELEASE]: Update SBOM'
|
||||
git push -u origin ${{ github.event.inputs.version_number }}
|
||||
echo "COMMIT_SHA_2=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
|
||||
|
@ -81,7 +94,7 @@ jobs:
|
|||
run: |
|
||||
# Install deps and run
|
||||
pip install -r ./tools/.github/scripts/release-requirements.txt
|
||||
./tools/.github/scripts/release.py FreeRTOS --kernel-repo-path=local_kernel --kernel-commit=${{ env.COMMIT_SHA_2 }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
|
||||
./tools/.github/scripts/release.py ${{ github.repository_owner }} --kernel-repo-path=local_kernel --kernel-commit=${{ env.COMMIT_SHA_2 }} --new-kernel-version=${{ github.event.inputs.version_number }} --new-kernel-main-br-version=${{ github.event.inputs.main_br_version }}
|
||||
exit $?
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
17
.github/workflows/kernel-demos.yml
vendored
17
.github/workflows/kernel-demos.yml
vendored
|
@ -123,9 +123,22 @@ jobs:
|
|||
with:
|
||||
ref: main
|
||||
repository: FreeRTOS/FreeRTOS
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Fetch Community-Supported-Demos Submodule
|
||||
shell: bash
|
||||
run: |
|
||||
# Fetch Community-Supported-Demos Submodule
|
||||
echo "::group::Fetch Community-Supported-Demos Submodule"
|
||||
git submodule update --checkout --init --depth 1 FreeRTOS/Demo/ThirdParty/Community-Supported-Demos
|
||||
echo "::engdroup::"
|
||||
if [ "$?" = "0" ]; then
|
||||
echo -e "\033[32;3mCloned the Community-Supported-Demos\033[0m"
|
||||
else
|
||||
echo -e "\033[32;31mCommunity-Supported-Demos Clone Failed...\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Checkout user pull request changes
|
||||
- name: Checkout Pull Request
|
||||
uses: actions/checkout@v2
|
||||
|
@ -169,7 +182,7 @@ jobs:
|
|||
|
||||
- name: Build CORTEX_M0+_RP2040 Demos
|
||||
shell: bash
|
||||
working-directory: FreeRTOS/Demo/ThirdParty/Community-Supported/CORTEX_M0+_RP2040
|
||||
working-directory: FreeRTOS/Demo/ThirdParty/Community-Supported-Demos/CORTEX_M0+_RP2040
|
||||
run: |
|
||||
git clone https://github.com/raspberrypi/pico-sdk.git
|
||||
cmake -B build -DPICO_SDK_PATH=pico-sdk -GNinja
|
||||
|
|
|
@ -2133,7 +2133,7 @@
|
|||
{
|
||||
BaseType_t xReturn = pdFAIL;
|
||||
QueueSetMemberHandle_t xInternalQueueSetMemberHandle = NULL;
|
||||
QueueSetHandle_t xInternalQueueSetHandle;
|
||||
QueueSetHandle_t xInternalQueueSetHandle = NULL;
|
||||
int32_t lIndexQueueSet, lIndexQueueSetMember;
|
||||
|
||||
lIndexQueueSet = ( int32_t ) xQueueSet;
|
||||
|
@ -2215,7 +2215,7 @@
|
|||
|
||||
const char * MPU_pcQueueGetNameImpl( QueueHandle_t xQueue ) /* PRIVILEGED_FUNCTION */
|
||||
{
|
||||
const char * pcReturn;
|
||||
const char * pcReturn = NULL;
|
||||
QueueHandle_t xInternalQueueHandle = NULL;
|
||||
int32_t lIndex;
|
||||
|
||||
|
@ -2519,7 +2519,7 @@
|
|||
{
|
||||
BaseType_t xReturn = pdFAIL;
|
||||
QueueSetMemberHandle_t xInternalQueueSetMemberHandle = NULL;
|
||||
QueueSetHandle_t xInternalQueueSetHandle;
|
||||
QueueSetHandle_t xInternalQueueSetHandle = NULL;
|
||||
int32_t lIndexQueueSet, lIndexQueueSetMember;
|
||||
|
||||
lIndexQueueSet = ( int32_t ) xQueueSet;
|
||||
|
@ -3330,7 +3330,7 @@
|
|||
const EventBits_t uxBitsToWaitFor,
|
||||
TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
|
||||
{
|
||||
EventBits_t xReturn;
|
||||
EventBits_t xReturn = 0;
|
||||
EventGroupHandle_t xInternalEventGroupHandle = NULL;
|
||||
int32_t lIndex;
|
||||
|
||||
|
|
Loading…
Reference in a new issue