Logging improved
This commit is contained in:
parent
0b9b4bcfd0
commit
33c4ba6dbd
|
@ -1,4 +1,4 @@
|
|||
vn-repo (2.0.16) stable; urgency=low
|
||||
vn-repo (2.0.17) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -8,12 +8,10 @@ do
|
|||
continue
|
||||
fi
|
||||
|
||||
myHost=$(hostname)
|
||||
repoDir=$(dirname "$0")/..
|
||||
projectName=$(basename "$(realpath "$repoDir")")
|
||||
|
||||
echo "Ref $ref received. It will be deployed automatically."
|
||||
echo "Host $myHost"
|
||||
|
||||
echo "$projectName" "master" > /tmp/vn-repo.changes
|
||||
#nohup sudo -u vn-repo "vn-branch $projectName" &> /dev/null &
|
||||
|
|
|
@ -12,10 +12,11 @@ logFile="/var/cache/reprepro/logs/$projectName.out"
|
|||
|
||||
rm -f "$logFile"
|
||||
|
||||
echo -e "\n# Deploying started.\n" >> "$logFile"
|
||||
echo -e "\n# Deploying started\n" >> "$logFile"
|
||||
echo " * Date: $(date)" >> "$logFile"
|
||||
echo " * Project: $projectName" >> "$logFile"
|
||||
echo " * Directory: $srcDir" >> "$logFile"
|
||||
echo " * Host: $(hostname)" >> "$logFile"
|
||||
|
||||
mkdir -p "$srcDir"
|
||||
git --work-tree="$srcDir" --git-dir="$repoDir" checkout -f
|
||||
|
@ -25,4 +26,4 @@ then
|
|||
(cd "$srcDir" && "$srcDir/deploy" >> "$logFile" 2>&1)
|
||||
fi
|
||||
|
||||
echo -e "\n# Deploying ended.\n" >> "$logFile"
|
||||
echo -e "\n# Deploying ended\n" >> "$logFile"
|
||||
|
|
|
@ -13,22 +13,22 @@ codename="stable"
|
|||
|
||||
if [ -f "$srcDir/package.json" ]
|
||||
then
|
||||
echo -e "\n# Installing Node dependencies.\n"
|
||||
echo -e "\n# Installing Node dependencies\n"
|
||||
(cd "$srcDir" && npm --silent install)
|
||||
fi
|
||||
|
||||
if [ -f "$srcDir/debian/changelog" ]
|
||||
then
|
||||
echo -e "\n# Cleaning last build.\n"
|
||||
echo -e "\n# Cleaning last build\n"
|
||||
rm -f $buildDir/*.deb
|
||||
rm -f $buildDir/*.changes
|
||||
rm -f $buildDir/*.build
|
||||
(cd "$srcDir" && debian/rules clean)
|
||||
|
||||
echo -e "\n# Building Debian packages.\n"
|
||||
echo -e "\n# Building Debian packages\n"
|
||||
(cd "$srcDir" && debuild -uc -us -b)
|
||||
|
||||
echo -e "\n# Adding packages to repository.\n"
|
||||
echo -e "\n# Adding packages to repository\n"
|
||||
|
||||
cut -d" " -f1 "$srcDir/debian/files" |
|
||||
while read debFile
|
||||
|
|
Reference in New Issue