blob: a0d7f1553ccc7584ef76425ed763dd7aef7ec07c [file] [log] [blame]
#!/bin/bash
set -e
versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
fi
versions=( "${versions[@]%/}" )
for version in "${versions[@]}"; do
rm -rf "$version"/*
cp Dockerfile.template jenkins.sh plugins.sh init.groovy "$version/"
mv "$version/Dockerfile.template" "$version/Dockerfile"
sed -i "" 's/%%JENKINS_VERSION%%/'$version'/g; s/%%JENKINS_VERSION%%/'$version'/g' "$version/Dockerfile"
done