mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
We use dev for unstable builds now
This commit is contained in:
parent
22ef52fe9c
commit
9d5806c6e8
1 changed files with 8 additions and 22 deletions
30
daily-build
30
daily-build
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
readonly THISSCRIPT=$0
|
readonly THISSCRIPT=$0
|
||||||
readonly BRANCH_NIGHTLY="unstable"
|
readonly BRANCH_NIGHTLY="dev"
|
||||||
readonly DISTRIBS="stretch buster"
|
readonly DISTRIBS="buster"
|
||||||
readonly TIMETAG="$(date +%Y%m%d%H%M)"
|
readonly TIMETAG="$(date +%Y%m%d%H%M)"
|
||||||
readonly PACKAGES="moulinette SSOwat yunohost yunohost-admin"
|
readonly PACKAGES="moulinette SSOwat yunohost yunohost-admin"
|
||||||
readonly FORCE="false"
|
readonly FORCE="false"
|
||||||
|
@ -42,29 +42,15 @@ function build_if_needed()
|
||||||
{
|
{
|
||||||
local PACKAGE=$1
|
local PACKAGE=$1
|
||||||
local DISTRIB=$2
|
local DISTRIB=$2
|
||||||
local LAST_BUILD_FOR_THIS_PACKAGE=$LAST_BUILDS_CACHE/${DISTRIB}_${BRANCH_NIGHTLY}_${PACKAGE}
|
local LAST_BUILD_FOR_THIS_PACKAGE=$LAST_BUILDS_CACHE/${DISTRIB}_${PACKAGE}
|
||||||
|
|
||||||
cd $GIT_REPOS/$PACKAGE
|
cd $GIT_REPOS/$PACKAGE
|
||||||
|
|
||||||
git fetch origin >/dev/null 2>/dev/null
|
git fetch origin >/dev/null 2>/dev/null
|
||||||
|
|
||||||
# Check if there's a branch named distrib-branch (e.g. stretch-unstable)
|
git checkout $BRANCH_NIGHTLY >/dev/null 2>/dev/null
|
||||||
# By default, keep just 'branch'
|
git pull origin $BRANCH_NIGHTLY >/dev/null 2>/dev/null
|
||||||
BRANCH_NIGHTLY_GIT="$BRANCH_NIGHTLY"
|
git reset --hard origin/$BRANCH_NIGHTLY
|
||||||
if git branch -ar | grep -q origin/$DISTRIB-$BRANCH_NIGHTLY
|
|
||||||
then
|
|
||||||
BRANCH_NIGHTLY_GIT="$DISTRIB-$BRANCH_NIGHTLY"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the branch name is an alias to another branch, "resolve" the alias
|
|
||||||
if grep -q "ref: " .git/refs/heads/$BRANCH_NIGHTLY_GIT 2>/dev/null
|
|
||||||
then
|
|
||||||
BRANCH_NIGHTLY_GIT=$(cat .git/refs/heads/$BRANCH_NIGHTLY_GIT | tr '/' ' ' | awk '{print $4}')
|
|
||||||
fi
|
|
||||||
|
|
||||||
git checkout $BRANCH_NIGHTLY_GIT >/dev/null 2>/dev/null
|
|
||||||
git pull origin $BRANCH_NIGHTLY_GIT >/dev/null 2>/dev/null
|
|
||||||
git reset --hard origin/$BRANCH_NIGHTLY_GIT
|
|
||||||
|
|
||||||
# Check if build is needed
|
# Check if build is needed
|
||||||
|
|
||||||
|
@ -97,7 +83,7 @@ function build_if_needed()
|
||||||
dch --package "${PACKAGE}" \
|
dch --package "${PACKAGE}" \
|
||||||
--force-bad-version \
|
--force-bad-version \
|
||||||
-v "${VERSION_NIGHTLY}" \
|
-v "${VERSION_NIGHTLY}" \
|
||||||
-D "${BRANCH_NIGHTLY}" \
|
-D "unstable" \
|
||||||
--force-distribution \
|
--force-distribution \
|
||||||
"Daily build." \
|
"Daily build." \
|
||||||
> /dev/null 2>&1
|
> /dev/null 2>&1
|
||||||
|
@ -131,7 +117,7 @@ function build()
|
||||||
# Build Debian package
|
# Build Debian package
|
||||||
echo "> Starting build ..."
|
echo "> Starting build ..."
|
||||||
cd $TMP_FOLDER
|
cd $TMP_FOLDER
|
||||||
$BUILD_DEB $DISTRIB $BRANCH_NIGHTLY .
|
$BUILD_DEB $DISTRIB "unstable" .
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in a new issue