forked from verdnatura/hedera-web
Bugs fixed
This commit is contained in:
parent
ba802341db
commit
df56173dd7
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.405.84) stable; urgency=low
|
hedera-web (1.405.85) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
vn-debuild
|
||||||
|
vn-deploy www1.static www2.static
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.405.84",
|
"version": "1.405.85",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
55
utils/deploy
55
utils/deploy
|
@ -1,55 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
baseDir=$(dirname "$0")
|
|
||||||
gitDir="$baseDir/.."
|
|
||||||
projectName=$(basename "$(realpath "$gitDir")")
|
|
||||||
buildDir="/tmp/git-deploy/$projectName"
|
|
||||||
srcDir="$buildDir/src"
|
|
||||||
repreproDir="/var/cache/reprepro"
|
|
||||||
codename="stable"
|
|
||||||
logFile="$buildDir/deploy.log"
|
|
||||||
|
|
||||||
echo "Building source code."
|
|
||||||
echo " * Directory $buildDir"
|
|
||||||
|
|
||||||
rm -f "$logFile"
|
|
||||||
|
|
||||||
mkdir -p "$srcDir"
|
|
||||||
git --work-tree="$srcDir" --git-dir="$gitDir" checkout -f
|
|
||||||
|
|
||||||
if [ -f "$srcDir/package.json" ]
|
|
||||||
then
|
|
||||||
echo "Installing Node dependencies."
|
|
||||||
(cd "$srcDir" && npm --silent install >> "$logFile")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$srcDir/debian/changelog" ]
|
|
||||||
then
|
|
||||||
echo "Cleaning last build."
|
|
||||||
rm -f $buildDir/*.deb
|
|
||||||
rm -f $buildDir/*.changes
|
|
||||||
rm -f $buildDir/*.build
|
|
||||||
(cd "$srcDir" && debian/rules clean >> "$logFile")
|
|
||||||
|
|
||||||
echo "Building Debian packages."
|
|
||||||
(cd "$srcDir" && debuild -uc -us -b >> "$logFile")
|
|
||||||
|
|
||||||
echo "Adding packages to repository."
|
|
||||||
packages=""
|
|
||||||
|
|
||||||
cut -d" " -f1 "$srcDir/debian/files" |
|
|
||||||
while read debFile
|
|
||||||
do
|
|
||||||
if [[ ! "$debFile" =~ .*\.deb$ ]]
|
|
||||||
then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
packageName=$(echo $debFile | cut -d"_" -f1)
|
|
||||||
packages="$packages $packageName"
|
|
||||||
|
|
||||||
echo " * Adding $debFile"
|
|
||||||
reprepro -b "$repreproDir" includedeb $codename "$buildDir/$debFile" >> "$logFile"
|
|
||||||
done
|
|
||||||
fi
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
packages=$1
|
|
||||||
hosts="www1.static.verdnatura.es www2.static.verdnatura.es"
|
|
||||||
|
|
||||||
if [ -z "$packages" ]
|
|
||||||
then
|
|
||||||
echo "Usage: $(basename $0) package_name..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# FIXME: Packages are not upgraded when config files are changed
|
|
||||||
|
|
||||||
echo "Upgrading servers."
|
|
||||||
|
|
||||||
for host in $hosts
|
|
||||||
do
|
|
||||||
echo " * Upgrading $host"
|
|
||||||
ssh root@$host "update-repo vn && apt-get install $packages >> /dev/null"
|
|
||||||
done
|
|
|
@ -44,6 +44,7 @@ class HtmlService extends Service
|
||||||
$updateBrowser = FALSE;
|
$updateBrowser = FALSE;
|
||||||
|
|
||||||
if (!isset ($_GET['skipBrowser'])
|
if (!isset ($_GET['skipBrowser'])
|
||||||
|
&& isset($_SERVER['HTTP_USER_AGENT'])
|
||||||
&& ($browser = get_browser ($_SERVER['HTTP_USER_AGENT'])))
|
&& ($browser = get_browser ($_SERVER['HTTP_USER_AGENT'])))
|
||||||
{
|
{
|
||||||
$browserVersion = (double) $browser->version;
|
$browserVersion = (double) $browser->version;
|
||||||
|
|
|
@ -5,6 +5,8 @@ $version = $this->getVersion();
|
||||||
|
|
||||||
function getUrl ($fileName)
|
function getUrl ($fileName)
|
||||||
{
|
{
|
||||||
|
global $version;
|
||||||
|
|
||||||
if (file_exists ($fileName))
|
if (file_exists ($fileName))
|
||||||
$fileVersion = strftime ('%G%m%d%H%M%S', filemtime ($fileName));
|
$fileVersion = strftime ('%G%m%d%H%M%S', filemtime ($fileName));
|
||||||
else
|
else
|
||||||
|
@ -15,12 +17,12 @@ function getUrl ($fileName)
|
||||||
|
|
||||||
function js ($fileName)
|
function js ($fileName)
|
||||||
{
|
{
|
||||||
return '<script type="text/javascript" src="'. getUrl ($fileName) .'.js"></script>'."\n";
|
return '<script type="text/javascript" src="'. getUrl ("$fileName.js") .'"></script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function css ($fileName)
|
function css ($fileName)
|
||||||
{
|
{
|
||||||
return '<link rel="stylesheet" type="text/css" href="'. getUrl ($fileName) .'.css"/>'."\n";
|
return '<link rel="stylesheet" type="text/css" href="'. getUrl ("$fileName.css") .'"/>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWebpackAssets ()
|
function getWebpackAssets ()
|
||||||
|
|
Loading…
Reference in New Issue