Skip to content

Commit 5036fed

Browse files
authored
Merge pull request #1384 from nasa/integration-candidate
osal Integration candidate: Caelum-rc4+dev47
2 parents 88d4b3b + 550d2ef commit 5036fed

File tree

3 files changed

+79
-1
lines changed

3 files changed

+79
-1
lines changed

.github/workflows/icbundle.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Integration Candidate Bundle Generation
2+
3+
# Generate Integration Candidate branch for this repository.
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
pr_nums:
9+
description: 'The pull request numbers to include (Comma separated)'
10+
required: true
11+
type: string
12+
13+
jobs:
14+
generate-ic-bundle:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Install Dependencies
18+
run: |
19+
sudo apt update
20+
sudo apt install -y w3m
21+
- name: Checkout IC Branch
22+
uses: actions/checkout@v3
23+
with:
24+
fetch-depth: '0'
25+
ref: main
26+
- name: Rebase IC Branch
27+
run: |
28+
git config user.name "GitHub Actions"
29+
git config user.email "[email protected]"
30+
git pull
31+
git checkout integration-candidate
32+
git rebase main
33+
- name: Merge each PR
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
run: |
37+
prs=$(echo ${{ inputs.pr_nums }} | tr "," "\n")
38+
for pr in $prs
39+
do
40+
src_branch=$(hub pr show -f %H $pr)
41+
pr_title=$(hub pr show -f %t $pr)
42+
commit_msg=$'Merge pull request #'"${pr}"$' from '"${src_branch}"$'\n\n'"${pr_title}"
43+
git fetch origin pull/$pr/head:origin/pull/$pr/head
44+
git merge origin/pull/$pr/head --no-ff -m "$commit_msg"
45+
done
46+
- name: Update Changelog and Version.h files
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
run: |
50+
rev_num=$(git rev-list v6.0.0-rc4.. --count)
51+
changelog_entry=$'# Changelog\\n\\n## Development Build: v6.0.0-rc4+dev'${rev_num}
52+
prs=$(echo ${{ inputs.pr_nums }} | tr "," "\n")
53+
see_entry=$'\-\ See:'
54+
for pr in $prs
55+
do
56+
pr_title=$(hub pr show -f %t $pr)
57+
changelog_entry="${changelog_entry}"$'\\n- '"${pr_title@Q}"
58+
see_entry="${see_entry}"$' <https://github.com/nasa/cFE/pull/'${pr}$'>'
59+
done
60+
changelog_entry="${changelog_entry}\n${see_entry}\n"
61+
echo "s|# Changelog|$changelog_entry|"
62+
sed -ir "s|Changelog|$changelog_entry|" CHANGELOG.md
63+
64+
buildnumber_entry=$'#define OS_BUILD_NUMBER '${rev_num}
65+
sed -ir "s|define OS_BUILD_NUMBER.*|$buildnumber_entry|" src/os/inc/osapi-version.h
66+
- name: Commit and Push Updates to IC Branch
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
run: |
70+
rev_num=$(git rev-list v6.0.0-rc4.. --count)
71+
git add CHANGELOG.md
72+
git add src/os/inc/osapi-version.h
73+
git commit -m "Updating documentation and version numbers for v6.0.0-rc4+dev${rev_num}"
74+
git push -v origin integration-candidate

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Development Build: v6.0.0-rc4+dev213
4+
- Create Workflow for IC Bundle Generation
5+
- See <https://github.com/nasa/osal/pull/1383>
6+
37
## Development Build: v6.0.0-rc4+dev209
48
- add assert macros for other data types
59
- See <https://github.com/nasa/osal/pull/1375>

src/os/inc/osapi-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
/*
3535
* Development Build Macro Definitions
3636
*/
37-
#define OS_BUILD_NUMBER 209
37+
#define OS_BUILD_NUMBER 213
3838
#define OS_BUILD_BASELINE "v6.0.0-rc4"
3939

4040
/*

0 commit comments

Comments
 (0)