1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 16:32:59 +00:00

Enforce .editorconfig by running eclint (#213)

* tune .editorconfig for the existing files
* fix reported linting issues
* travis: switch language to node_js to be able to run npm
* travis: build on ubuntu bionic
This commit is contained in:
Felix Bartels
2019-08-12 16:14:45 +02:00
committed by GitHub
parent d901eb05b9
commit fb37723cc3
30 changed files with 402 additions and 377 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
# Kopano base image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger version")
# Kopano base image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger version")
Common base for Kopano images. Predefines arguments and prepares fetching of Kopano packages and building of a local repository (when using nightly downloads).
+30 -30
View File
@@ -6,49 +6,49 @@ set -eu
function urldecode { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
function version_from_filename {
echo "$1" | sed -r 's#[a-z]+-([0-9_.+]+)-.*#\1#'
echo "$1" | sed -r 's#[a-z]+-([0-9_.+]+)-.*#\1#'
}
function h5ai_query {
component=${1:-core}
distribution=${2:-Debian_9.0}
component=${1:-core}
distribution=${2:-Debian_9.0}
filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$component%3A%2F&items%5Bwhat%5D=1" -H \
"Accept: application/json" https://download.kopano.io/community/ | jq -r '.items[].href' | \
grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##")
filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$component%3A%2F&items%5Bwhat%5D=1" -H \
"Accept: application/json" https://download.kopano.io/community/ | jq -r '.items[].href' | \
grep "$distribution-all\|$distribution-amd64" | sed "s#/community/$component:/##")
if [ -z "${filename// }" ]; then
echo "unknown component"
exit 1
fi
if [ -z "${filename// }" ]; then
echo "unknown component"
exit 1
fi
filename=$(urldecode "$filename")
echo "$filename"
filename=$(urldecode "$filename")
echo "$filename"
}
function dl_and_package_community {
# take component as first argument and fallback to core if none given
component=${1:-core}
distribution=${2:-Debian_9.0}
# take component as first argument and fallback to core if none given
component=${1:-core}
distribution=${2:-Debian_9.0}
# query community server by h5ai API
filename=$(h5ai_query "$component" "$distribution")
# query community server by h5ai API
filename=$(h5ai_query "$component" "$distribution")
# download & extract packages
curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}"
tar xf "$filename"
# download & extract packages
curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}"
tar xf "$filename"
# save buildversion
currentVersion=$(version_from_filename "$filename")
echo "$component-$currentVersion" >> /kopano/buildversion
# save buildversion
currentVersion=$(version_from_filename "$filename")
echo "$component-$currentVersion" >> /kopano/buildversion
# save disk space
rm "$filename"
# save disk space
rm "$filename"
mv "${filename%.tar.gz}" "$component"
mv "${filename%.tar.gz}" "$component"
# prepare directory to be apt source
cd "$component"
apt-ftparchive packages . | gzip -9c > Packages.gz
cd ".."
# prepare directory to be apt source
cd "$component"
apt-ftparchive packages . | gzip -9c > Packages.gz
cd ".."
}