mirror of
https://github.com/friendica/docker
synced 2024-05-17 20:36:42 +02:00
Fixing a lot of spaces & tabs!
This commit is contained in:
parent
aa0795900a
commit
7fe1de658d
|
@ -6,5 +6,23 @@ root = true
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
trim_trailing_whitespaces = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|
||||||
|
[*.sh]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.template]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[Dockerfile]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -59,7 +59,7 @@ clone_develop() {
|
||||||
|
|
||||||
# just check if we execute apache or php-fpm
|
# just check if we execute apache or php-fpm
|
||||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||||
# cloning from git is just possible for develop or Release Candidats
|
# cloning from git is just possible for develop or Release Candidate
|
||||||
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
if echo "${FRIENDICA_VERSION}" | grep -Eq '^.*(\-dev|-rc|-RC)' || [ "${FRIENDICA_UPGRADE:-false}" = "true" ] || [ ! -f /usr/src/friendica/VERSION ]; then
|
||||||
# just clone & check if it's a new install or upgrade
|
# just clone & check if it's a new install or upgrade
|
||||||
clone_develop
|
clone_develop
|
||||||
|
|
|
@ -6,8 +6,8 @@ declare -A release_channel=(
|
||||||
[latest]='2020.03'
|
[latest]='2020.03'
|
||||||
)
|
)
|
||||||
|
|
||||||
self="$(basename "$BASH_SOURCE")"
|
self="$(basename "${BASH_SOURCE[0]}")"
|
||||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
|
cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
# Get the most recent commit which modified any of "$@".
|
# Get the most recent commit which modified any of "$@".
|
||||||
fileCommit() {
|
fileCommit() {
|
||||||
|
@ -27,12 +27,12 @@ dockerfileCommit() {
|
||||||
(
|
(
|
||||||
cd "$dir";
|
cd "$dir";
|
||||||
fileCommit Dockerfile \
|
fileCommit Dockerfile \
|
||||||
$(awk '
|
"$(awk '
|
||||||
toupper($1) == "COPY" {
|
toupper($1) == "COPY" {
|
||||||
for (i = 2; i < NF; i++)
|
for (i = 2; i < NF; i++)
|
||||||
print $i;
|
print $i;
|
||||||
}
|
}
|
||||||
' Dockerfile)
|
' Dockerfile)"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ versions=( "${versions[@]%/}" )
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
variants=( $version/*/ )
|
variants=( $version/*/ )
|
||||||
variants=( $(for variant in "${variants[@]%/}"; do
|
variants=( $(for variant in "${variants[@]%/}"; do
|
||||||
echo "$(basename "$variant")"
|
basename "$variant"
|
||||||
done) )
|
done) )
|
||||||
for variant in "${variants[@]}"; do
|
for variant in "${variants[@]}"; do
|
||||||
commit="$(dockerfileCommit "$version/$variant")"
|
commit="$(dockerfileCommit "$version/$variant")"
|
||||||
|
@ -82,10 +82,10 @@ for version in "${versions[@]}"; do
|
||||||
versionPostfix=""
|
versionPostfix=""
|
||||||
|
|
||||||
versionAliases+=( "$version$versionPostfix" )
|
versionAliases+=( "$version$versionPostfix" )
|
||||||
if [ "$version" == *-rc ]; then
|
if [[ "$version" == *-rc ]]; then
|
||||||
versionAliases+=( "rc" )
|
versionAliases+=( "rc" )
|
||||||
fi
|
fi
|
||||||
if [ "$version" == *-dev ]; then
|
if [[ "$version" == *-dev ]]; then
|
||||||
versionAliases+=( "dev" )
|
versionAliases+=( "dev" )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -103,12 +103,13 @@ for version in "${versions[@]}"; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/$variant/Dockerfile")"
|
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/$variant/Dockerfile")"
|
||||||
|
# shellcheck disable=SC2154
|
||||||
variantArches="${parentRepoToArches[$variantParent]}"
|
variantArches="${parentRepoToArches[$variantParent]}"
|
||||||
|
|
||||||
cat <<-EOE
|
cat << EOE
|
||||||
|
|
||||||
Tags: $(join ', ' "${variantAliases[@]}")
|
Tags: $(join ', ' "${variantAliases[@]}")
|
||||||
Architectures: $(join ', ' $variantArches)
|
Architectures: $(join ', ' "$variantArches")
|
||||||
GitCommit: $commit
|
GitCommit: $commit
|
||||||
Directory: $version/$variant
|
Directory: $version/$variant
|
||||||
EOE
|
EOE
|
||||||
|
|
|
@ -162,7 +162,6 @@ function create_variant() {
|
||||||
find . -maxdepth 1 -type d -regextype sed -regex '\./[[:digit:]]\+\(\.\|\-\)[[:digit:]]\+\(-rc\|-dev\)\?' -exec rm -r '{}' \;
|
find . -maxdepth 1 -type d -regextype sed -regex '\./[[:digit:]]\+\(\.\|\-\)[[:digit:]]\+\(-rc\|-dev\)\?' -exec rm -r '{}' \;
|
||||||
|
|
||||||
for version in "${versions[@]}"; do
|
for version in "${versions[@]}"; do
|
||||||
|
|
||||||
for variant in "${variants[@]}"; do
|
for variant in "${variants[@]}"; do
|
||||||
|
|
||||||
create_variant "$version"
|
create_variant "$version"
|
||||||
|
|
Loading…
Reference in a new issue