Skip to content

Commit

Permalink
automataCI: added i18n feature to release changelog function
Browse files Browse the repository at this point in the history
Since we want i18n feature to be applied across all release CI job,
we should first deal with release changelog function. Hence, let's
do this.

This patch applies i18n feature to release changelog function in
automataCI/ directory.

Co-authored-by: Galyna, Cory <[email protected]>
Co-authored-by: (Holloway) Chew, Kean Ho <[email protected]>
Signed-off-by: (Holloway) Chew, Kean Ho <[email protected]>
  • Loading branch information
hollowaykeanho and corygalyna committed Dec 17, 2023
1 parent 85d2bf2 commit e53cf59
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
14 changes: 7 additions & 7 deletions automataCI/_release-changelog_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/os.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/fs.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/compilers/changelog.sh"
. "${LIBS_ATUOMATACI}/services/compilers/changelog.sh"

. "${LIBS_ATUOMATACI}/services/i18n/status-file.sh"



RELEASE::run_changelog_conclude() {

RELEASE_Conclude_CHANGELOG() {
# execute
OS::print_status info "sealing changelog latest entries...\n"
I18N_Status_Print_File_Export "${PROJECT_VERSION} CHANGELOG"
CHANGELOG_Seal \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_RESOURCES}/changelog" \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/changelog" \
"$PROJECT_VERSION"
if [ $? -ne 0 ]; then
OS::print_status error "seal failed.\n"
I18N_Status_Print_File_Export_Failed
return 1
fi

Expand Down
17 changes: 9 additions & 8 deletions automataCI/_release-changelog_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\os.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\fs.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\compilers\changelog.ps1"
. "${env:LIBS_AUTOMATACI}\services\compilers\changelog.ps1"

. "${env:LIBS_AUTOMATACI}\services\i18n\status-file.ps1"



function RELEASE-Run-Changelog-Conclude {

function RELEASE-Conclude-CHANGELOG {
# execute
OS-Print-Status info "Sealing changelog latest entries..."
$__process = CHANGELOG-Seal `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RESOURCES}\changelog" `
$null = I18N-Status-Print-File-Export "${env:PROJECT_VERSION} CHANGELOG"
$___process = CHANGELOG-Seal `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\changelog" `
"${env:PROJECT_VERSION}"
if ($__process -ne 0) {
if ($___process -ne 0) {
$null = I18N-Status-Print-File-Export-Failed
return 1
}

Expand Down
2 changes: 1 addition & 1 deletion automataCI/release_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ else
return 1
fi

RELEASE::run_changelog_conclude
RELEASE_Conclude_CHANGELOG
if [ $? -ne 0 ]; then
return 1
fi
Expand Down
4 changes: 2 additions & 2 deletions automataCI/release_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ if (-not ([string]::IsNullOrEmpty(${env:PROJECT_SIMULATE_RELEASE_REPO}))) {
return 1
}

$__process = RELEASE-Run-Changelog-Conclude
if ($__process -ne 0) {
$___process = RELEASE-Conclude-CHANGELOG
if ($___process -ne 0) {
return 1
}

Expand Down

0 comments on commit e53cf59

Please sign in to comment.