80 lines
2.5 KiB
Bash
80 lines
2.5 KiB
Bash
/bin/bash
|
|
set -x
|
|
# Each update should apply to a different branch:
|
|
# dist-oldoldstable jessie
|
|
# dist-oldstable ascii
|
|
# dist-stable beowulf
|
|
# dist-testing chimaera
|
|
# dist-unstable ceres
|
|
#
|
|
# So git checkout each in turn. This keeps master free for development
|
|
# Run current stable last so that it gets marked as lastest
|
|
# For the generate-stackbrew-library.sh to work the images have to be commited locally
|
|
# and to github
|
|
#
|
|
|
|
# ARCHIVED: The original upstream: git remote add origin git@github.com:tianon/docker-brew-debian.git
|
|
# DELETED: The github fork: git remote add origin git@github.com:cyteen/docker-brew-devuan.git
|
|
# DELETED: The devuan fork upstream: git remote add origin git@git.devuan.org:cyteen/docker-brew-debian.git
|
|
|
|
# To set multiple push
|
|
# git remote set-url --add --push origin git@github.com:cyteen/docker-brew-debian.git
|
|
# git remote set-url --add --push origin ssh://cyteen@github.com:443/cyteen/docker-brew-debian.git
|
|
# git remote set-url --add --push origin git@git.devuan.org:cyteen/docker-brew-debian.git
|
|
|
|
master='master'
|
|
#master='devuan'
|
|
|
|
MIRROR=http://pkgmaster.devuan.org/merged
|
|
|
|
|
|
## We fix the 'binary in a git repo' issue with git-lfs:
|
|
# git lfs install # initialize the Git LFS project
|
|
# git lfs track "*.tar.xz" # select the file extensions that you want to treat as large files
|
|
# git add . # add the large file to the project
|
|
# git commit -am "Added devuan root tarball." # commit the file meta data
|
|
# git push origin master # sync the git repo and large file to the GitLab server
|
|
# git add .gitattributes
|
|
|
|
build_image () {
|
|
cd docker-brew-devuan
|
|
git branch -d "$2"
|
|
git checkout --orphan "$2"
|
|
echo devuan > ./repo
|
|
echo ${MIRROR} > ./mirror
|
|
echo main > ./components
|
|
|
|
mkdir -p ./"$1"
|
|
#echo 1 > ./$1/merged-usr
|
|
echo "inetutils-ping,iproute2" > ./"$1"/include
|
|
|
|
bash "${PWD}"/update.sh "$1"
|
|
git add .
|
|
git commit -m "Commit after build of $1 in $2"
|
|
#git push -u origin $2
|
|
}
|
|
|
|
if [ "$1" == "jessie" ]
|
|
then
|
|
BRANCH="dist-oldoldstable"
|
|
build_image "$1" ${BRANCH}
|
|
elif [ "$1" == "ascii" ]
|
|
then
|
|
BRANCH="dist-oldstable"
|
|
build_image "$1" ${BRANCH}
|
|
elif [ "$1" == "beowulf" ]
|
|
then
|
|
BRANCH="dist-stable"
|
|
build_image "$1" ${BRANCH}
|
|
elif [ "$1" == "chimaera" ]
|
|
then
|
|
BRANCH="dist-testing"
|
|
build_image "$1" ${BRANCH}
|
|
elif [ "$1" == "ceres" ]
|
|
then
|
|
BRANCH="dist-unstable"
|
|
build_image "$1" ${BRANCH}
|
|
else
|
|
echo "The given release is not one of jessie, ascii, beowulf, chimaera, ceres."
|
|
fi
|