Skip to content

Commit

Permalink
root: added CITATION.cff generative function
Browse files Browse the repository at this point in the history
Since git repository can be used for academic dataset referencing,
we best support its CITATION.cff feature from the get-go. Hence,
let's do this.

This patch adds CITATION.cff generative function into the 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
hollowaykeanho and corygalyna committed Nov 4, 2023
1 parent 9a4f41f commit 790ddcb
Show file tree
Hide file tree
Showing 16 changed files with 879 additions and 6 deletions.
62 changes: 62 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# WARNING: auto-generated by AutomataCI

cff-version: "1.2.0"
type: "software"
date-released: "2023-11-04"
title: "AutomataCI"
version: "1.7.0"
license: "Apache-2.0"
repository: "https://github.com/ChewKeanHo/AutomataCI"
repository-code: "https://github.com/ChewKeanHo/AutomataCI"
repository-artifact: "https://github.com/ChewKeanHo/AutomataCI/wiki/"
url: "https://your-product.website.here"
contact:
- affiliation: "Your Legal Full Name Here"
email: "[email protected]"
website: "https://your-product.website.here"
abstract: |-
Continuous improvements or integrations (CI) is a nerve system of a
software product production. Leaving the job blindly by outsourcing
to any proprietary 3rd-party CI service provider is a guaranteed
way for being threatened and extorted by any malicious suppliers.
As of year 2021 to 2023, many evidences show that the suppliers
vilely alter their pricing charges after the fact to the point of
legally extorting their customers and destroyed some useful
software entirely.
Therefore, AutomataCI counters such problem by facilitating CI
functions natively, making it locally available, decentralized,
and redistributable at git repository level. 3rd-party service
providers can only call AutomataCI just like how the developer
performs them locally. This de-risk the software owner by not
completely depending on the service provider, allowing him/her
to switch supplier easily. AutomataCI also facilitates
technology-specific automation customization, capable of
absorbing new changes easily across time. It only uses the
basic POSIX compliant Shell and PowerShell scripts.
message: |-
Please cite and reference this repository accordingly.
authors:
- given-names: "Kean Ho"
family-names: "Chew"
email: "[email protected]"
affiliation: "Independent"
orcid: "https://orcid.org/0000-0003-4202-4863"
- given-names: "Cory"
family-names: "Galyna"
email: "[email protected]"
affiliation: "Independent"
identifiers:
- type: doi
value: "10.5281/zenodo.000000"
description: "Paper"
keywords:
- "continuous integration"
- "native and locally available"
- "git enhancement"
- "decentralized"
- "redistributable"
- "powershell"
- "posix shell"
- "solid foundation"
- "self-improvable"
21 changes: 21 additions & 0 deletions CONFIG.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,27 @@ PROJECT_C = ''



######################
# CITATION #
######################
# PROJECT_CITATION
# This is the control variable used to generate the CITATION.cff file during the
# Release CI Job. It is the cff-version field's value.
#
# To enable it, simply simply the supported version. Default is '1.2.0'.
# To dsiable it, simply leave it empty.
PROJECT_CITATION="1.2.0"


# PROJECT_CITATION_TYPE
# The type's field value of the repository representing the content of it.
#
# Can only accept 'software' or 'dataset'. Default is 'software'.
PROJECT_CITATION_TYPE="software"




######################
# GO TECHNOLOGY #
######################
Expand Down
59 changes: 59 additions & 0 deletions automataCI/_release-citation_unix-any.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/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/io/time.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/compilers/citation.sh"




RELEASE::run_citation() {
# execute
OS::print_status info "generating citation file...\n"
CITATION::build \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/CITATION.cff" \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/ABSTRACTS.txt" \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_SOURCE}/docs/CITATIONS.yml" \
"$PROJECT_CITATION" \
"$PROJECT_CITATION_TYPE" \
"$(TIME::format_iso8601_date "$(TIME::now)")" \
"$PROJECT_NAME" \
"$PROJECT_VERSION" \
"$PROJECT_LICENSE" \
"$PROJECT_SOURCE_URL" \
"$PROJECT_SOURCE_URL" \
"$PROJECT_STATIC_URL" \
"$PROJECT_CONTACT_NAME" \
"$PROJECT_CONTACT_WEBSITE" \
"$PROJECT_CONTACT_EMAIL"
if [ $? -ne 0 ]; then
OS::print_status error "generate failed.\n"
return 1
fi

if [ -f "${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/CITATION.cff" ]; then
OS::print_status info "exporting CITATION.cff...\n"
FS::copy_file \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}/CITATION.cff" \
"${PROJECT_PATH_ROOT}/CITATION.cff"
if [ $? -ne 0 ]; then
OS::print_status error "export failed.\n"
return 1
fi
fi


# report status
return 0
}
59 changes: 59 additions & 0 deletions automataCI/_release-citation_windows-any.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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\io\time.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\compilers\citation.ps1"




function RELEASE-Run-Citation {
# execute
OS-Print-Status info "generating citation file..."
$__process = CITATION-Build `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\CITATION.cff" `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\ABSTRACTS.txt" `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_SOURCE}\docs\CITATIONS.yml" `
"${env:PROJECT_CITATION}" `
"${env:PROJECT_CITATION_TYPE}" `
"$(TIME-Format-ISO8601-Date "$(TIME-Now)")" `
"${env:PROJECT_NAME}" `
"${env:PROJECT_VERSION}" `
"${env:PROJECT_LICENSE}" `
"${env:PROJECT_SOURCE_URL}" `
"${env:PROJECT_SOURCE_URL}" `
"${env:PROJECT_STATIC_URL}" `
"${env:PROJECT_CONTACT_NAME}" `
"${env:PROJECT_CONTACT_WEBSITE}" `
"${env:PROJECT_CONTACT_EMAIL}"
if ($__process -ne 0) {
OS-Print-Status error "generate failed."
return 1
}


if (Test-Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\CITATION.cff") {
OS-Print-Status info "exporting CITATION.cff..."
$__process = FS-Copy-File `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_PKG}\CITATION.cff" `
"${env:PROJECT_PATH_ROOT}\CITATION.cff"
if ($__process -ne 0) {
OS-Print-Status error "export failed."
return 1
}
}


# report status
return 0
}
Binary file modified automataCI/docs/AutomataCI-Engineering-Specification.odt
Binary file not shown.
Binary file modified automataCI/docs/AutomataCI-Engineering-Specification.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions automataCI/release_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fi
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-changelog_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-checksum_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-chocolatey_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-citation_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-deb_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-docker_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/_release-homebrew_unix-any.sh"
Expand Down Expand Up @@ -139,6 +140,12 @@ for TARGET in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_PKG}"/*; do
done


RELEASE::run_citation
if [ $? -ne 0 ]; then
return 1
fi


RELEASE::run_checksum_seal "$STATIC_REPO"
if [ $? -ne 0 ]; then
return 1
Expand Down
7 changes: 7 additions & 0 deletions automataCI/release_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) {
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-changelog_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-checksum_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-chocolatey_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-citation_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-deb_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-docker_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\_release-homebrew_windows-any.ps1"
Expand Down Expand Up @@ -140,6 +141,12 @@ foreach ($TARGET in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT
}


$__process = RELEASE-Run-Citation
if ($__process -ne 0) {
return 1
}


$__process = RELEASE-Run-Checksum-Seal "$STATIC_REPO"
if ($__process -ne 0) {
return 1
Expand Down
Loading

0 comments on commit 790ddcb

Please sign in to comment.