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/ssowat
|
||||||
git clone https://github.com/yunohost/moulinette
|
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/
|
mkdir -p /var/www/repo/debian/conf/
|
||||||
ln -s $VINAIGRETTE_HOME/config/distributions /var/www/repo/debian/conf/distributions
|
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 $VINAIGRETTE_HOME/images /var/cache/pbuilder/images
|
||||||
ln -s /var/cache/pbuilder/result $PBUILDER_RESULTS
|
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/keys/$DEBSIGN_KEYID.pub | apt-key add
|
||||||
cat $VINAIGRETTE_HOME/config/sources.list > /etc/apt/sources.list.d/vinaigrette.list
|
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() {
|
usage() {
|
||||||
echo "
|
cat << EOF
|
||||||
Usage:
|
Usage:
|
||||||
`basename $0` <project> <branch> <version>
|
`basename $0` <project> <branch> <version>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Arguments:
|
||||||
<branch> testing or stable
|
<branch> testing or stable
|
||||||
<distrib> jessie or stretch
|
<distrib> jessie or stretch
|
||||||
<version> x.y.z (ex: 2.6.1)
|
<version> x.y.z (ex: 2.6.1)
|
||||||
"
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $1 == "-h" ]]; then
|
if [[ $1 == "-h" ]]; then
|
||||||
|
@ -28,36 +28,33 @@ fi
|
||||||
# Check user inputs #
|
# Check user inputs #
|
||||||
# ################# #
|
# ################# #
|
||||||
|
|
||||||
|
PROJECT=$1
|
||||||
|
BRANCH=$2
|
||||||
|
DISTRIB=$3
|
||||||
|
VERSION=$4
|
||||||
|
|
||||||
## Project
|
## Project
|
||||||
if [[ $1 =~ ^yunohost|yunohost-admin|moulinette|SSOwat$ ]]; then
|
if [[ ! $PROJECT =~ ^yunohost|yunohost-admin|moulinette|SSOwat$ ]]; then
|
||||||
PROJECT=$1
|
echo "Invalid project $PROJECT"
|
||||||
else
|
|
||||||
echo "Invalid project $1"
|
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Branch
|
## Branch
|
||||||
if [[ $2 =~ ^testing|stable$ ]]; then
|
if [[ ! $BRANCH =~ ^testing|stable$ ]]; then
|
||||||
BRANCH=$2
|
echo "Invalid branch $BRANCH"
|
||||||
else
|
|
||||||
echo "Invalid branch $2"
|
|
||||||
usage
|
usage
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Distribution
|
# Distribution
|
||||||
if [[ $3 =~ ^jessie|stretch$ ]]; then
|
if [[ ! $DISTRIB =~ ^jessie|stretch$ ]]; then
|
||||||
DISTRIB=$3
|
echo "Invalid distribution $DISTRIB"
|
||||||
else
|
|
||||||
echo "Invalid distribution $3"
|
|
||||||
usage
|
usage
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
VERSION=$4
|
|
||||||
echo $VERSION
|
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
echo "Invalid version $VERSION"
|
echo "Invalid version $VERSION"
|
||||||
usage
|
usage
|
||||||
|
|
Loading…
Reference in a new issue