Skip to content

Commit 18d9675

Browse files
committed
Add package.json file to manage the branch version release.
1 parent b8344c5 commit 18d9675

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

.github/script/BuildScript.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ extern "C" {
3434
#endif'
3535

3636
$TargetFile = 'kernal_version.h'
37+
$PackageFile = 'package.json'
3738

3839
<#
3940
.PARAMETER Environment
@@ -154,4 +155,14 @@ function BuildScript
154155

155156
$FirmwareRelease = $Major + "." + $Minor + "." + $Patch
156157
Write-Host $FirmwareRelease
158+
159+
$packageContent = Get-Content -Raw -Path $PackageFile | ConvertFrom-Json
160+
161+
$packageContent.version = $FirmwareRelease
162+
$packageContent.timestamp = $timestamp
163+
$packageContent.commit_id = $ReadCommitId
164+
165+
$packageString = $packageContent | ConvertTo-Json -Depth 10
166+
167+
$packageString | Set-Content -Path $PackageFile
157168
}

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ I hope the At-RTOS could be a popular community-based embedded controller's real
1515

1616
## News
1717

18-
![GitHub Release](https://img.shields.io/github/v/release/At-EC/At-RTOS)
19-
- Welcome to At-RTOS. This production version was released which supports a stable RTOS feature was implemented in the kernal system, Pls enjoy it (:
18+
At-RTOS branch and release news as shown as the following table:
2019

21-
![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/At-EC/At-RTOS/main)
22-
- The development version in the main branch was implemented which will support new features, but it maybe contain unknown issues.
20+
| Version Name | Description |
21+
| ------------- | ------------------------------------------------------------------------------------ |
22+
| ![GitHub Release](https://img.shields.io/github/v/release/At-EC/At-RTOS) | - Welcome to At-RTOS. This production version was released which supports a stable RTOS feature was implemented in the kernal system, Pls enjoy it (: |
23+
| ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/At-EC/At-RTOS/main) | - The development version in the main branch was implemented which will support new features, but it maybe contain unknown issues. |
2324

2425
## Introduction
2526

kernal_version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
extern "C" {
1313
#endif
1414

15-
#define ATOS_BUILD_TIME "2024-02-14,21:10"
16-
#define ATOS_COMMIT_HEAD_ID "915c903bd378a1693488794565796915c0157e1c"
15+
#define ATOS_BUILD_TIME "2024-02-15,11:24"
16+
#define ATOS_COMMIT_HEAD_ID "b8344c54828813787ac4cafa0a177ff7c0741796"
1717
#define ATOS_VERSION_MAJOR_NUMBER (0u)
1818
#define ATOS_VERSION_MINOR_NUMBER (3u)
19-
#define ATOS_VERSION_PATCH_NUMBER (5u)
19+
#define ATOS_VERSION_PATCH_NUMBER (6u)
2020

2121
#define ATOS_VERSION_MAJOR_NUMBER_MASK (0x03FFu)
2222
#define ATOS_VERSION_MAJOR_NUMBER_POS (22u)

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2-
"name": "At-RTOS",
3-
"version": "0.3.5"
4-
}
2+
"name": "At-RTOS",
3+
"version": "0.3.6",
4+
"timestamp": "2024-02-15,11:24",
5+
"commit_id": "b8344c54828813787ac4cafa0a177ff7c0741797"
6+
}

0 commit comments

Comments
 (0)