Skip to content

Commit

Permalink
src: tidied up DESCRIPTION.txt template to ABSTRACTS.txt
Browse files Browse the repository at this point in the history
Since we want to support Research citation generator from the get-go,
we should first tidy up the current DESCRIPTION.txt template into
ABSTRACTS.txt template. That way, user only need to fill in the
abstract once and applied everywhere. Hence, let's do this.

This patch tidies up DESCRIPTION.txt template file to ABSTRACTS.txt
template file in src/ 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 Nov 3, 2023
1 parent 0cdc9cb commit 1618dac
Show file tree
Hide file tree
Showing 15 changed files with 111 additions and 83 deletions.
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.
30 changes: 17 additions & 13 deletions automataCI/services/compilers/deb.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ function DEB-Create-Control {
[string]$__website,
[string]$__pitch,
[string]$__priority,
[string]$__section
[string]$__section,
[string]$__description_filepath
)


Expand Down Expand Up @@ -251,19 +252,22 @@ Description: ${__pitch}


# append description data file
Foreach ($__line in (Get-Content -Path "${__resources}/packages/DESCRIPTION.txt")) {
if (![string]::IsNullOrEmpty($__line) -and
($__line -eq $__line -replace "#.*$")) {
continue
if ((-not [string]::IsNullOrEmpty($__description_filepath)) -and
(Test-Path -Path "${__description_filepath}")) {
foreach ($__line in (Get-Content -Path "${__description_filepath}")) {
if ((-not [string]::IsNullOrEmpty($__line)) -and
[string]::IsNullOrEmpty($__line -replace "#.*$")) {
continue
}

if ([string]::IsNullOrEmpty($__line)) {
$__line = " ."
} else {
$__line = " ${__line}"
}

$null = FS-Append-File $__location $__line
}

if ([string]::IsNullOrEmpty($__line)) {
$__line = " ."
} else {
$__line = " ${__line}"
}

$null = FS-Append-File $__location $__line
}


Expand Down
33 changes: 18 additions & 15 deletions automataCI/services/compilers/deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ DEB::create_control() {
__pitch="${10}"
__priority="${11}"
__section="${12}"
__description_filepath="${13}"


# validate input
Expand Down Expand Up @@ -242,21 +243,23 @@ Description: $__pitch


# append description data file
old_IFS="$IFS"
while IFS="" read -r __line || [ -n "$__line" ]; do
if [ ! -z "$__line" -a -z "${__line%%#*}" ]; then
continue
fi

if [ -z "$__line" ]; then
__line=" ."
else
__line=" ${__line}"
fi

FS::append_file "$__location" "${__line}\n"
done < "${__resources}/packages/DESCRIPTION.txt"
IFS="$old_IFS" && unset old_IFS __line
if [ ! -z "$__description_filepath" ] && [ -f "$__description_filepath" ]; then
old_IFS="$IFS"
while IFS="" read -r __line || [ -n "$__line" ]; do
if [ ! -z "$__line" -a -z "${__line%%#*}" ]; then
continue
fi

if [ -z "$__line" ]; then
__line=" ."
else
__line=" ${__line}"
fi

FS::append_file "$__location" "${__line}\n"
done < "${__description_filepath}"
IFS="$old_IFS" && unset old_IFS __line
fi


# report status
Expand Down
30 changes: 17 additions & 13 deletions automataCI/services/compilers/ipk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ function IPK-Create-Control {
[string]$__website,
[string]$__pitch,
[string]$__priority,
[string]$__section
[string]$__section,
[string]$__description_filepath
)


Expand Down Expand Up @@ -168,19 +169,22 @@ Description: ${__pitch}


# append description data file
Foreach ($__line in (Get-Content -Path "${__resources}/packages/DESCRIPTION.txt")) {
if (![string]::IsNullOrEmpty($__line) -and
($__line -eq $__line -replace "#.*$")) {
continue
if ((-not [string]::IsNullOrEmpty($__description_filepath)) -and
(Test-Path -Path "${__description_filepath}")) {
foreach ($__line in (Get-Content -Path "${__description_filepath}")) {
if ((-not [string]::IsNullOrEmpty($__line)) -and
[string]::IsNullOrEmpty($__line -replace "#.*$")) {
continue
}

if ([string]::IsNullOrEmpty($__line)) {
$__line = " ."
} else {
$__line = " ${__line}"
}

$null = FS-Append-File $__location $__line
}

if ([string]::IsNullOrEmpty($__line)) {
$__line = " ."
} else {
$__line = " ${__line}"
}

$null = FS-Append-File $__location $__line
}


Expand Down
33 changes: 18 additions & 15 deletions automataCI/services/compilers/ipk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ IPK::create_control() {
__pitch="${10}"
__priority="${11}"
__section="${12}"
__description_filepath="${13}"


# validate input
Expand Down Expand Up @@ -160,21 +161,23 @@ Description: $__pitch


# append description data file
old_IFS="$IFS"
while IFS="" read -r __line || [ -n "$__line" ]; do
if [ ! -z "$__line" -a -z "${__line%%#*}" ]; then
continue
fi

if [ -z "$__line" ]; then
__line=" ."
else
__line=" ${__line}"
fi

FS::append_file "$__location" "${__line}\n"
done < "${__resources}/packages/DESCRIPTION.txt"
IFS="$old_IFS" && unset old_IFS __line
if [ ! -z "$__description_filepath" ] && [ -f "$__description_filepath" ]; then
old_IFS="$IFS"
while IFS="" read -r __line || [ -n "$__line" ]; do
if [ ! -z "$__line" -a -z "${__line%%#*}" ]; then
continue
fi

if [ -z "$__line" ]; then
__line=" ."
else
__line=" ${__line}"
fi

FS::append_file "$__location" "${__line}\n"
done < "${__description_filepath}"
IFS="$old_IFS" && unset old_IFS __line
fi


# report status
Expand Down
18 changes: 11 additions & 7 deletions automataCI/services/compilers/rpm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ function RPM-Create-Spec {
[string]$__name,
[string]$__email,
[string]$__website,
[string]$__license
[string]$__license,
[string]$__description_filepath
)


Expand Down Expand Up @@ -249,22 +250,25 @@ URL: ${__website}
$null = FS-Append-File $__location "%%description`n"
if (Test-Path "${__directory}\SPEC_DESCRIPTION") {
foreach($__line in Get-Content "${__directory}\SPEC_DESCRIPTION") {
$__line = $_ -replace '#.*'
if ([string]::IsNullOrEmpty($__line)) {
if ((-not [string]::IsNullOrEmpty($__line)) -and
[string]::IsNullOrEmpty($__line -replace "#.*$")) {
continue
}

$__line = $_ -replace '#.*'
$null = FS-Append-File $__location "${__line}`n"
}

$null = FS-Remove-Silently "${__directory}\SPEC_DESCRIPTION"
} elseif (Test-Path "${__resources}\packages\DESCRIPTION.txt") {
foreach($__line in Get-Content "${__resources}\packages\DESCRIPTION.txt") {
$__line = $_ -replace '#.*'
if ([string]::IsNullOrEmpty($__line)) {
} elseif ((-not [string]::IsNullOrEmpty($__description_filepath)) -and
(Test-Path -Path "${__description_filepath}")) {
foreach($__line in Get-Content "${__description_filepath}") {
if ((-not [string]::IsNullOrEmpty($__line)) -and
[string]::IsNullOrEmpty($__line -replace "#.*$")) {
continue
}

$__line = $_ -replace '#.*'
$null = FS-Append-File $__location "${__line}`n"
}
} else {
Expand Down
19 changes: 9 additions & 10 deletions automataCI/services/compilers/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ RPM::create_spec() {
__email="$8"
__website="$9"
__license="${10}"
__description_filepath="${11}"


# validate input
Expand Down Expand Up @@ -245,27 +246,25 @@ URL: ${__website}
if [ -f "${__directory}/SPEC_DESCRIPTION" ]; then
__old_IFS="$IFS"
while IFS="" read -r __line || [ -n "$__line" ]; do
__line="${__line%%#*}"
if [ -z "$__line" ]; then
if [ ! -z "$__line" -a -z "${__line%%#*}" ]; then
continue
fi

FS::append_file "$__location" "${__line}\n"
FS::append_file "$__location" "${__line%%#*}\n"
done < "${__directory}/SPEC_DESCRIPTION"
IFS="$__old_IFS" && unset __old_IFS __line

FS::remove_silently "${__directory}/SPEC_DESCRIPTION"
elif [ -f "${__resources}/packages/DESCRIPTION.txt" ]; then
__old_IFS="$IFS"
elif [ ! -z "$__description_filepath" ] && [ -f "$__description_filepath" ]; then
old_IFS="$IFS"
while IFS="" read -r __line || [ -n "$__line" ]; do
__line="${__line%%#*}"
if [ -z "$__line" ]; then
if [ ! -z "$__line" -a -z "${__line%%#*}" ]; then
continue
fi

FS::append_file "$__location" "${__line}\n"
done < "${__resources}/packages/DESCRIPTION.txt"
IFS="$__old_IFS" && unset __old_IFS __line
FS::append_file "$__location" "${__line%%#*}\n"
done < "${__description_filepath}"
IFS="$old_IFS" && unset old_IFS __line
else
FS::append_file "$__location" "\n"
fi
Expand Down
3 changes: 2 additions & 1 deletion src/.ci/_package-deb_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ PACKAGE::assemble_deb_content() {
"$PROJECT_CONTACT_WEBSITE" \
"$PROJECT_PITCH" \
"$PROJECT_DEBIAN_PRIORITY" \
"$PROJECT_DEBIAN_SECTION"
"$PROJECT_DEBIAN_SECTION" \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_RESOURCES}/docs/ABSTRACTS.txt"
if [ $? -ne 0 ]; then
return 1
fi
Expand Down
3 changes: 2 additions & 1 deletion src/.ci/_package-deb_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ function PACKAGE-Assemble-DEB-Content {
"${env:PROJECT_CONTACT_WEBSITE}" `
"${env:PROJECT_PITCH}" `
"${env:PROJECT_DEBIAN_PRIORITY}" `
"${env:PROJECT_DEBIAN_SECTION}"
"${env:PROJECT_DEBIAN_SECTION}" `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RESOURCES}\docs\ABSTRACTS.txt"
if ($__process -ne 0) {
return 1
}
Expand Down
3 changes: 2 additions & 1 deletion src/.ci/_package-ipk_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ PACKAGE::assemble_ipk_content() {
"$PROJECT_CONTACT_WEBSITE" \
"$PROJECT_PITCH" \
"$PROJECT_DEBIAN_PRIORITY" \
"$PROJECT_DEBIAN_SECTION"
"$PROJECT_DEBIAN_SECTION" \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_RESOURCES}/docs/ABSTRACTS.txt"
if [ $? -ne 0 ]; then
return 1
fi
Expand Down
3 changes: 2 additions & 1 deletion src/.ci/_package-ipk_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ function PACKAGE-Assemble-IPK-Content {
"${env:PROJECT_CONTACT_WEBSITE}" `
"${env:PROJECT_PITCH}" `
"${env:PROJECT_DEBIAN_PRIORITY}" `
"${env:PROJECT_DEBIAN_SECTION}"
"${env:PROJECT_DEBIAN_SECTION}" `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RESOURCES}\docs\ABSTRACTS.txt"
if ($__process -ne 0) {
return 1
}
Expand Down
3 changes: 2 additions & 1 deletion src/.ci/_package-rpm_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ install -m 0644 ${PROJECT_SKU}.1.gz %{buildroot}/usr/local/share/man/man1/
"$PROJECT_CONTACT_NAME" \
"$PROJECT_CONTACT_EMAIL" \
"$PROJECT_CONTACT_WEBSITE" \
"$PROJECT_LICENSE"
"$PROJECT_LICENSE" \
"${PROJECT_PATH_ROOT}/${PROJECT_PATH_RESOURCES}/docs/ABSTRACTS.txt"
if [ $? -ne 0 ]; then
return 1
fi
Expand Down
3 changes: 2 additions & 1 deletion src/.ci/_package-rpm_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ install -m 644 ${env:PROJECT_SKU}.1.gz %{buildroot}/usr/local/share/man/man1/
"${env:PROJECT_CONTACT_NAME}" `
"${env:PROJECT_CONTACT_EMAIL}" `
"${env:PROJECT_CONTACT_WEBSITE}" `
"${env:PROJECT_LICENSE}"
"${env:PROJECT_LICENSE}" `
"${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_RESOURCES}\docs\ABSTRACTS.txt"
if ($__process -ne 0) {
return 1
}
Expand Down
13 changes: 9 additions & 4 deletions src/packages/DESCRIPTION.txt → src/docs/ABSTRACTS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
# This is a line-by-line long package descripton usually append after the #
# pitch or acting independently. You can write as long as you want as long as #
# it complies to the following rules: #
# (1) Keep it text-form only; AND #
# (2) Max 70 characters per line (DEB and RPM requires it); AND #
# (3) Keep it ASCII for backward compatibilities purposes. #
# (1) Keep it text-form only; AND #
# (2) Max 69 characters per line (DEB, RPM, and Citation requires it); #
# AND #
# (3) Keep it ASCII for backward compatibilities purposes. #
# #
# You should write the long description of the project repository like an #
# abstract: introducing, specify the problem, actions, and ends with what to #
# to exect from exploring it. #
################################################################################
# 🠳 Max #
# 🠳 Max #
################################################################################
Your longer description here. New empty line is separated by a
newline as shown below. The packager shall automatically format it
Expand Down

0 comments on commit 1618dac

Please sign in to comment.