blob: 851600b924d75bf42cd36f11cd1f7fbf8f06b543 [file] [log] [blame]
#!/usr/bin/env bash
#*******************************************************************************
# Copyright (c) 2019 Eclipse Foundation and others.
# This program and the accompanying materials are made available
# under the terms of the Eclipse Public License 2.0
# which is available at http://www.eclipse.org/legal/epl-v20.html,
# or the MIT License which is available at https://opensource.org/licenses/MIT.
# SPDX-License-Identifier: EPL-2.0 OR MIT
#*******************************************************************************
# Bash strict-mode
set -o errexit
set -o nounset
set -o pipefail
# Parameters:
release_name=${1:-}
dockerhub_repo=eclipsecbi/eclipse-infocenter
# Verify inputs
if [[ -z "${release_name}" && $# -lt 1 ]]; then
printf "ERROR: a release name must be given.\n"
exit 1
fi
#workaround
tmp_dir=tmp
mkdir -p ${tmp_dir}
tar xzf info-center-${release_name}-*.tar.gz --strip-components=2 -C ${tmp_dir}
rm ${tmp_dir}/*InfoCenter.sh
cat <<EOF > ${tmp_dir}/startDockerInfoCenter.sh
#!/usr/bin/env bash
./eclipse -nosplash -application org.eclipse.help.base.helpApplication -nl en -locales en -data workspace -plugincustomization plugin_customization.ini -vmargs -Xmx1024m -Dserver_port=8086
EOF
docker build -t ${dockerhub_repo}:${release_name} .
docker push ${dockerhub_repo}:${release_name}
rm -rf ${tmp_dir}