From 8bd12e1cb61a04ccebf410f82665611792d1a5dc Mon Sep 17 00:00:00 2001 From: "(Holloway) Chew, Kean Ho" Date: Sat, 16 Dec 2023 16:32:36 +0800 Subject: [PATCH] automataCI: backported finalization changes for chocolatey packager There were some finalization changes not applied for chocolatey packager function. Hence, let's do this. This patch backports finalization changes for chocolatey packager in automataCI/ directory. Co-authored-by: Galyna, Cory <124406765+corygalyna@users.noreply.github.com> Co-authored-by: (Holloway) Chew, Kean Ho Signed-off-by: (Holloway) Chew, Kean Ho --- automataCI/_package-chocolatey_unix-any.sh | 10 +++++----- automataCI/_package-chocolatey_windows-any.ps1 | 2 +- automataCI/package_unix-any.sh | 2 +- automataCI/package_windows-any.ps1 | 2 +- automataCI/services/publishers/chocolatey.ps1 | 8 ++++---- automataCI/services/publishers/chocolatey.sh | 10 +++++----- src/.ci/_package-chocolatey_unix-any.sh | 2 +- srcRUST/.ci/_package-chocolatey_unix-any.sh | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/automataCI/_package-chocolatey_unix-any.sh b/automataCI/_package-chocolatey_unix-any.sh index 130e5cdf..c4782a69 100644 --- a/automataCI/_package-chocolatey_unix-any.sh +++ b/automataCI/_package-chocolatey_unix-any.sh @@ -32,7 +32,7 @@ fi -PACKAGE_Run_Chocolatey() { +PACKAGE_Run_CHOCOLATEY() { #__line="$1" @@ -78,7 +78,7 @@ PACKAGE_Run_Chocolatey() { # copy all complimentary files to the workspace - cmd="PACKAGE_Assemble_Chocolatey_Content" + cmd="PACKAGE_Assemble_CHOCOLATEY_Content" I18N_Status_Print_Package_Assembler_Check "$cmd" OS::is_command_available "$cmd" if [ $? -ne 0 ]; then @@ -129,7 +129,7 @@ PACKAGE_Run_Chocolatey() { __name="${__name}-chocolatey_${PROJECT_VERSION}_${_target_os}-${_target_arch}.nupkg" __name="${_dest}/${__name}" I18N_Status_Print_File_Archive "$__name" - CHOCOLATEY::archive "$__name" "$_src" + CHOCOLATEY_Archive "$__name" "$_src" if [ $__exit -ne 0 ]; then I18N_Status_Print_File_Archive_Failed return 1 @@ -138,9 +138,9 @@ PACKAGE_Run_Chocolatey() { # test the package I18N_Status_Print_Package_Testing "$__name" - CHOCOLATEY::is_available + CHOCOLATEY_Is_Available if [ $? -eq 0 ]; then - CHOCOLATEY::test "$__name" + CHOCOLATEY_Test "$__name" if [ $? -ne 0 ]; then I18N_Status_Print_Package_Testing_Failed return 1 diff --git a/automataCI/_package-chocolatey_windows-any.ps1 b/automataCI/_package-chocolatey_windows-any.ps1 index 56bfbe4d..3de37ea0 100644 --- a/automataCI/_package-chocolatey_windows-any.ps1 +++ b/automataCI/_package-chocolatey_windows-any.ps1 @@ -31,7 +31,7 @@ if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) { -function PACKAGE-Run-Chocolatey { +function PACKAGE-Run-CHOCOLATEY { param ( [string]$__line ) diff --git a/automataCI/package_unix-any.sh b/automataCI/package_unix-any.sh index 86e6406a..cb2acdbb 100644 --- a/automataCI/package_unix-any.sh +++ b/automataCI/package_unix-any.sh @@ -183,7 +183,7 @@ ${__common}|${__log}|PACKAGE_Run_CARGO __log="${__log_directory}/chocolatey_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" FS::append_file "$__parallel_control" "\ -${__common}|${__log}|PACKAGE_Run_Chocolatey +${__common}|${__log}|PACKAGE_Run_CHOCOLATEY " if [ $? -ne 0 ]; then return 1 diff --git a/automataCI/package_windows-any.ps1 b/automataCI/package_windows-any.ps1 index 46da35f3..27399c68 100644 --- a/automataCI/package_windows-any.ps1 +++ b/automataCI/package_windows-any.ps1 @@ -199,7 +199,7 @@ ${__common}|${__log}|PACKAGE-Run-CARGO $__log = "${__log_directory}\chocolatey_${TARGET_FILENAME}_${TARGET_OS}-${TARGET_ARCH}.log" $__process = FS-Append-File "${__parallel_control}" @" -${__common}|${__log}|PACKAGE-Run-Chocolatey +${__common}|${__log}|PACKAGE-Run-CHOCOLATEY "@ if ($__process -ne 0) { return 1 diff --git a/automataCI/services/publishers/chocolatey.ps1 b/automataCI/services/publishers/chocolatey.ps1 index 47843bc1..313bdfdf 100644 --- a/automataCI/services/publishers/chocolatey.ps1 +++ b/automataCI/services/publishers/chocolatey.ps1 @@ -9,10 +9,10 @@ # 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\io\net\http.ps1" -. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\archive\zip.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\os.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\fs.ps1" +. "${env:LIBS_AUTOMATACI}\services\io\net\http.ps1" +. "${env:LIBS_AUTOMATACI}\services\archive\zip.ps1" diff --git a/automataCI/services/publishers/chocolatey.sh b/automataCI/services/publishers/chocolatey.sh index 010a9880..f42e89ce 100644 --- a/automataCI/services/publishers/chocolatey.sh +++ b/automataCI/services/publishers/chocolatey.sh @@ -10,11 +10,11 @@ # 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/io/strings.sh" -. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/net/http.sh" -. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/archive/zip.sh" +. "${LIBS_AUTOMATACI}/services/io/os.sh" +. "${LIBS_AUTOMATACI}/services/io/fs.sh" +. "${LIBS_AUTOMATACI}/services/io/strings.sh" +. "${LIBS_AUTOMATACI}/services/io/net/http.sh" +. "${LIBS_AUTOMATACI}/services/archive/zip.sh" diff --git a/src/.ci/_package-chocolatey_unix-any.sh b/src/.ci/_package-chocolatey_unix-any.sh index 8ee2f91a..0a53cd30 100644 --- a/src/.ci/_package-chocolatey_unix-any.sh +++ b/src/.ci/_package-chocolatey_unix-any.sh @@ -26,7 +26,7 @@ fi -PACKAGE_Assemble_Chocolatey_Content() { +PACKAGE_Assemble_CHOCOLATEY_Content() { _target="$1" _directory="$2" _target_name="$3" diff --git a/srcRUST/.ci/_package-chocolatey_unix-any.sh b/srcRUST/.ci/_package-chocolatey_unix-any.sh index cbfda9e4..615d5f95 100644 --- a/srcRUST/.ci/_package-chocolatey_unix-any.sh +++ b/srcRUST/.ci/_package-chocolatey_unix-any.sh @@ -27,7 +27,7 @@ fi -PACKAGE_Assemble_Chocolatey_Content() { +PACKAGE_Assemble_CHOCOLATEY_Content() { _target="$1" _directory="$2" _target_name="$3"