-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
root: added Angular frontend framework technology
Since we want Angular frontend framework to be supported from the get-go replacing the old Hugo technology we had been using for a while, we should proceed to add it in. Hence, let's do this. This patch adds Angular frontend framework technology into root repository. 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
1 parent
839e61c
commit 64f9c9c
Showing
106 changed files
with
14,158 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,23 @@ PROJECT_SOURCE_URL = "https://github.com/ChewKeanHo/AutomataCI" | |
|
||
|
||
|
||
###################### | ||
# ANGULAR TECHNOLOGY # | ||
###################### | ||
# PROJECT_ANGULAR | ||
# This is a control variable used for enabling Angular technology and also | ||
# defining its source codes directory relative to PROJECT_PATH_ROOT. Depending | ||
# on the offered service (e.g. GitHub Actions), setting this variable with value | ||
# shall notify the CI provider to setup Go development environment | ||
# automatically. | ||
# | ||
# To enable it: simply supply the path (e.g. default is 'srcANGULAR'). | ||
# To disable it: simply supply an empty path (e.g. default is ''). | ||
PROJECT_ANGULAR = 'srcANGULAR' | ||
|
||
|
||
|
||
|
||
###################### | ||
# NIM TECHNOLOGY # | ||
###################### | ||
|
@@ -142,7 +159,7 @@ PROJECT_C = '' | |
# | ||
# To enable it: simply supply the path (e.g. default is 'srcGO'). | ||
# To disable it: simply supply an empty path (e.g. default is ''). | ||
PROJECT_GO = 'srcGO' | ||
PROJECT_GO = '' | ||
|
||
|
||
# PROJECT_PATH_GO_ENGINE | ||
|
@@ -456,6 +473,36 @@ PROJECT_CHOCOLATEY_DIRECTORY="chocolatey" | |
PROJECT_CHOCOLATEY_SOURCE_URL="https://github.com/ChewKeanHo/AutomataCI/releases/download" | ||
|
||
|
||
# PROJECT_DOCS_REPO | ||
# The git repository for publishing all the docs web artifacts. This URL shall | ||
# be git cloned into the PROJECT_PATH_RELEASE directory. | ||
PROJECT_DOCS_REPO="[email protected]:ChewKeanHo/AutomataCI.git" | ||
|
||
|
||
# PROJECT_DOCS_REPO_KEY | ||
# The git upstream key. Default is 'origin'. | ||
PROJECT_DOCS_REPO_KEY="origin" | ||
|
||
|
||
# PROJECT_DOCS_REPO_BRANCH | ||
# The git upstream branch. Default is 'gh-pages'. | ||
PROJECT_DOCS_REPO_BRANCH="gh-pages" | ||
|
||
|
||
# PROJECT_DOCS_REPO_DIRECTORY | ||
# The directory name housing the docs repo. Value CANNOT be empty. | ||
# Default is 'docs'. | ||
PROJECT_DOCS_REPO_DIRECTORY="docs" | ||
|
||
|
||
# PROJECT_DOCS_SOURCE_URL | ||
# The base URL for viewing the published documentation (e.g. website address). | ||
# It is made available in-case of publication needs. | ||
# | ||
# NOTE: Please avoid ending with the URL slash. | ||
PROJECT_DOCS_SOURCE_URL="https://github.io/ChewKeanHo/AutomataCI" | ||
|
||
|
||
|
||
|
||
###################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/bin/sh | ||
# Copyright 2023 (Holloway) Chew, Kean Ho <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at: | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# 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/versioners/git.sh" | ||
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/compilers/installer.sh" | ||
|
||
|
||
|
||
|
||
RELEASE::docs_repo() { | ||
# validate input | ||
OS::print_status info "publishing artifacts to docs repo...\n" | ||
if [ ! -d "${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS}" ]; then | ||
OS::print_status warning "release skipped - No docs directory.\n" | ||
return 0 | ||
fi | ||
|
||
|
||
# clean up base directory | ||
OS::print_status info "safety checking docs repo directory...\n" | ||
if [ -f "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_DOCS_REPO_DIRECTORY}" ]; then | ||
OS::print_status error "check failed.\n" | ||
return 1 | ||
fi | ||
FS::make_directory "${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}" | ||
|
||
|
||
# execute | ||
OS::print_status info "setting up release docs repo...\n" | ||
INSTALLER::setup_resettable_repo \ | ||
"$PROJECT_PATH_ROOT" \ | ||
"$PROJECT_PATH_RELEASE" \ | ||
"$PWD" \ | ||
"$PROJECT_DOCS_REPO" \ | ||
"$PROJECT_SIMULATE_RELEASE_REPO" \ | ||
"$PROJECT_DOCS_REPO_DIRECTORY" \ | ||
"$PROJECT_DOCS_REPO_BRANCH" | ||
if [ $? -ne 0 ]; then | ||
OS::print_status error "setup failed.\n" | ||
return 1 | ||
fi | ||
|
||
|
||
# move existing items to docs repo | ||
__staging="${PROJECT_PATH_ROOT}/${PROJECT_PATH_DOCS}" | ||
__dest="${PROJECT_PATH_ROOT}/${PROJECT_PATH_RELEASE}/${PROJECT_DOCS_REPO_DIRECTORY}" | ||
|
||
OS::print_status info "exporting staging contents to docs repo...\n" | ||
FS::copy_all "${__staging}/" "$__dest" | ||
if [ $? -ne 0 ]; then | ||
OS::print_status error "export failed.\n" | ||
return 1 | ||
fi | ||
|
||
OS::print_status info "Sourcing commit id for tagging...\n" | ||
__tag="$(GIT::get_latest_commit_id)" | ||
if [ -z "$__tag" ]; then | ||
OS::print_status error "Source failed.\n" | ||
return 1 | ||
fi | ||
|
||
__current_path="$PWD" && cd "${__dest}" | ||
|
||
OS::print_status info "Committing docs repo...\n" | ||
GIT::autonomous_force_commit \ | ||
"$__tag" \ | ||
"$PROJECT_DOCS_REPO_KEY" \ | ||
"$PROJECT_DOCS_REPO_BRANCH" | ||
__exit=$? | ||
|
||
cd "$__current_path" && unset __current_path | ||
|
||
if [ $__exit -ne 0 ]; then | ||
OS::print_status error "commit failed.\n" | ||
return 1 | ||
fi | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Copyright 2023 (Holloway) Chew, Kean Ho <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy | ||
# of the License at: | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# 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\versioners\git.ps1" | ||
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\compilers\installer.ps1" | ||
|
||
|
||
|
||
|
||
function RELEASE-Docs-Repo { | ||
# validate input | ||
OS-Print-Status info "publishing artifacts to docs repo..." | ||
if (-not (Test-Path ` | ||
-PathType Container ` | ||
-Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}")) { | ||
OS-Print-Status warning "release skipped - No docs directory." | ||
return 0 | ||
} | ||
|
||
|
||
# clean up base directory | ||
OS-Print-Status info "safety checking docs repo release directory..." | ||
if (Test-Path -PathType Leaf ` | ||
-Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_DOCS_REPO_DIRECTORY}") { | ||
OS-Print-Status error "check failed." | ||
return 1 | ||
} | ||
$null = FS-Make-Directory "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}" | ||
|
||
|
||
# execute | ||
OS-Print-Status info "setting up release docs repo..." | ||
$__process = INSTALLER-Setup-Resettable-Repo ` | ||
"${env:PROJECT_PATH_ROOT}" ` | ||
"${env:PROJECT_PATH_RELEASE}" ` | ||
"$(Get-Location)" ` | ||
"${env:PROJECT_DOCS_REPO}" ` | ||
"${env:PROJECT_SIMULATE_RELEASE_REPO}" ` | ||
"${env:PROJECT_DOCS_REPO_DIRECTORY}" ` | ||
"${env:PROJECT_DOCS_REPO_BRANCH}" | ||
if ($__process -ne 0) { | ||
OS-Print-Status error "setup failed." | ||
return 1 | ||
} | ||
|
||
|
||
# move existing items to docs repo | ||
$__staging = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_DOCS}" | ||
$__dest = "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RELEASE}\${env:PROJECT_DOCS_REPO_DIRECTORY}" | ||
|
||
OS-Print-Status info "exporting staging contents to docs repo..." | ||
$__process = FS-Copy-All "${__staging}\" "${__dest}" | ||
if ($__process -ne 0) { | ||
OS-Print-Status error "export failed." | ||
return 1 | ||
} | ||
|
||
OS-Print-Status info "Sourcing commit id for tagging..." | ||
$__tag = GIT-Get-Latest-Commit-ID | ||
if ([string]::IsNullOrEmpty(${__tag})) { | ||
OS-Print-Status error "Source failed." | ||
return 1 | ||
} | ||
|
||
$__current_path = Get-Location | ||
$null = Set-Location "${__dest}" | ||
|
||
OS-Print-Status info "Committing docs repo..." | ||
$__process = Git-Autonomous-Force-Commit ` | ||
"${__tag}" ` | ||
"${env:PROJECT_DOCS_REPO_KEY}" ` | ||
"${env:PROJECT_DOCS_REPO_BRANCH}" | ||
|
||
$null = Set-Location "${__current_path}" | ||
$null = Remove-Variable __current_path | ||
|
||
if ($__process -ne 0) { | ||
OS-Print-Status error "Commit failed." | ||
return 1 | ||
} | ||
|
||
|
||
# report status | ||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.