mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
Tweaking ynh-build to handle stretch-unstable branch
This commit is contained in:
parent
392c0c6481
commit
23d83ac52c
2 changed files with 21 additions and 17 deletions
9
init.sh
9
init.sh
|
@ -15,6 +15,13 @@ git clone https://github.com/yunohost/yunohost-admin
|
|||
git clone https://github.com/yunohost/ssowat
|
||||
git clone https://github.com/yunohost/moulinette
|
||||
|
||||
cd yunohost
|
||||
git symbolic-ref refs/heads/jessie-stable refs/heads/stable
|
||||
git symbolic-ref refs/heads/jessie-testing refs/heads/testing
|
||||
git symbolic-ref refs/heads/jessie-unstable refs/heads/unstable
|
||||
git symbolic-ref refs/heads/stretch-unstable refs/heads/stretch
|
||||
cd ..
|
||||
|
||||
mkdir -p /var/www/repo/debian/conf/
|
||||
ln -s $VINAIGRETTE_HOME/config/distributions /var/www/repo/debian/conf/distributions
|
||||
|
||||
|
@ -23,7 +30,7 @@ ln -s $VINAIGRETTE_HOME/config/rebuildd.conf /etc/rebuildd/rebuilddrc
|
|||
|
||||
ln -s $VINAIGRETTE_HOME/images /var/cache/pbuilder/images
|
||||
ln -s /var/cache/pbuilder/result $PBUILDER_RESULTS
|
||||
cp $VINAIGRETTE_HOME/conf/nginx.conf /etc/nginx/sites-enabled/repo.conf
|
||||
cp $VINAIGRETTE_HOME/config/nginx.conf /etc/nginx/sites-enabled/repo.conf
|
||||
|
||||
cat $VINAIGRETTE_HOME/config/keys/$DEBSIGN_KEYID.pub | apt-key add
|
||||
cat $VINAIGRETTE_HOME/config/sources.list > /etc/apt/sources.list.d/vinaigrette.list
|
||||
|
|
29
ynh-build
29
ynh-build
|
@ -7,7 +7,7 @@ source /home/vinaigrette/config/config
|
|||
# ##### #
|
||||
|
||||
usage() {
|
||||
echo "
|
||||
cat << EOF
|
||||
Usage:
|
||||
`basename $0` <project> <branch> <version>
|
||||
|
||||
|
@ -16,7 +16,7 @@ Arguments:
|
|||
<branch> testing or stable
|
||||
<distrib> jessie or stretch
|
||||
<version> x.y.z (ex: 2.6.1)
|
||||
"
|
||||
EOF
|
||||
}
|
||||
|
||||
if [[ $1 == "-h" ]]; then
|
||||
|
@ -28,36 +28,33 @@ fi
|
|||
# Check user inputs #
|
||||
# ################# #
|
||||
|
||||
PROJECT=$1
|
||||
BRANCH=$2
|
||||
DISTRIB=$3
|
||||
VERSION=$4
|
||||
|
||||
## Project
|
||||
if [[ $1 =~ ^yunohost|yunohost-admin|moulinette|SSOwat$ ]]; then
|
||||
PROJECT=$1
|
||||
else
|
||||
echo "Invalid project $1"
|
||||
if [[ ! $PROJECT =~ ^yunohost|yunohost-admin|moulinette|SSOwat$ ]]; then
|
||||
echo "Invalid project $PROJECT"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Branch
|
||||
if [[ $2 =~ ^testing|stable$ ]]; then
|
||||
BRANCH=$2
|
||||
else
|
||||
echo "Invalid branch $2"
|
||||
if [[ ! $BRANCH =~ ^testing|stable$ ]]; then
|
||||
echo "Invalid branch $BRANCH"
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Distribution
|
||||
if [[ $3 =~ ^jessie|stretch$ ]]; then
|
||||
DISTRIB=$3
|
||||
else
|
||||
echo "Invalid distribution $3"
|
||||
if [[ ! $DISTRIB =~ ^jessie|stretch$ ]]; then
|
||||
echo "Invalid distribution $DISTRIB"
|
||||
usage
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# Version
|
||||
VERSION=$4
|
||||
echo $VERSION
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Invalid version $VERSION"
|
||||
usage
|
||||
|
|
Loading…
Reference in a new issue