Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardcoded versions from release cronjobs #814

Open
wants to merge 28 commits into
base: grass8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions utils/cronjobs_osgeo_lxd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ programmer's manual.
* generate and deploy the GRASS GIS Web pages at <https://grass.osgeo.org/>:
* `hugo_clean_and_update_job.sh`
* GRASS GIS source code weekly snapshots:
* grass7-stable: `cron_grass7_relbranch_src_snapshot.sh`
* grass8-stable: `cron_grass8_relbranch_src_snapshot.sh`
* grass8-devel: `cron_grass8_main_src_snapshot.sh`
* grass-legacy: `cron_grass_legacy_releasebranch_src_snapshot.sh`
* grass-stable: `cron_grass_releasebranch_src_snapshot.sh`
* grass-devel: `cron_grass_main_src_snapshot.sh`
* GRASS GIS Linux binary weekly snapshots:
* grass7-stable: `cron_grass7_relbranch_build_binaries.sh`
* grass8-stable: `cron_grass8_relbranch_build_binaries.sh`
* grass-legacy: `cron_grass_legacy_releasebranch_build_binaries.sh`
* grass-stable: `cron_grass_releasebranch_build_binaries.sh`
* GRASS GIS addons manual pages:
* grass7-stable: within `cron_grass7_relbranch_build_binaries.sh`
* grass8-stable: within `cron_grass8_relbranch_build_binaries.sh`
* GRASS GIS 7 addons overview page at <https://grass.osgeo.org/grass7/manuals/addons/>:
* `compile_addons_git.sh` - called from `cron_grass7_relbranch_build_binaries.sh`
* `build-xml.py` - called from `cron_grass7_relbranch_build_binaries.sh`,
* grass-legacy: within `cron_grass_legacy_releasebranch_build_binaries.sh`
* grass-stable: within `cron_grass_releasebranch_build_binaries.sh`
* GRASS GIS legacy addons overview page at <https://grass.osgeo.org/grass-legacy/manuals/addons/>:
* `compile_addons_git.sh` - called from `cron_grass_legacy_releasebranch_build_binaries.sh`
* `build-xml.py` - called from `cron_grass_legacy_releasebranch_build_binaries.sh`,
generates the modules.xml file required for the g.extension module
* `grass-addons-index.sh` - called from `cron_grass7_relbranch_build_binaries.sh`
* `grass-addons-index.sh` - called from `cron_grass_legacy_releasebranch_build_binaries.sh`
* `get_page_description.py` - called from `grass-addons-index.sh`
* GRASS GIS 8 addons overview page at <https://grass.osgeo.org/grass8/manuals/addons/>:
* `compile_addons_git.sh` - called from `cron_grass8_relbranch_build_binaries.sh`
* `build-xml.py` - called from `cron_grass8_relbranch_build_binaries.sh`
* GRASS GIS addons overview page at <https://grass.osgeo.org/grass-stable/manuals/addons/>:
* `compile_addons_git.sh` - called from `cron_grass_releasebranch_build_binaries.sh`
* `build-xml.py` - called from `cron_grass_releasebranch_build_binaries.sh`
generates the modules.xml file required for the g.extension module
* `grass-addons-index.sh` - called from `cron_grass8_relbranch_build_binaries.sh`
* `grass-addons-index.sh` - called from `cron_grass_releasebranch_build_binaries.sh`
* `get_page_description.py` - called from `grass-addons-index.sh`
* GRASS GIS programmer's manual:
* within `cron_grass8_relbranch_build_binaries.sh`
* within `cron_grass_releasebranch_build_binaries.sh`
* compilation addons:
* `compile_addons_git.sh` it's called with `$5` arg, addon is
installed into own individual directory, with **bin/ docs/ etc/ scripts/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

# script to build GRASS 7.x binaries + addons from the `releasebranch_7_x` binaries
# script to build GRASS 7.x binaries + addons from the `releasebranch_7_0` binaries
ninsbl marked this conversation as resolved.
Show resolved Hide resolved
# (c) GPL 2+ Markus Neteler <neteler@osgeo.org>
# 2008, 2014, 2015, 2016, 2017, 2018, 2019, 2021, 2022
# 2008, 2014, 2015, 2016, 2017, 2018, 2019, 2021
ninsbl marked this conversation as resolved.
Show resolved Hide resolved
#
# GRASS GIS github, https://github.com/OSGeo/grass
#
Expand All @@ -23,19 +23,29 @@
# - generates the user 7 HTML manuals
# - injects DuckDuckGo search field
# - injects G8 new version box
# - injects canonical URL

# Preparations:
# - Install PROJ
# - Install PROJ: http://trac.osgeo.org/proj/ incl Datum shift grids
# sh conf_proj4.sh
# - Install GDAL: http://trac.osgeo.org/gdal/wiki/DownloadSource
# sh conf_gdal.sh
# - Install apt-get install texlive-latex-extra python3-sphinxcontrib.apidoc
# - Clone source from github
#################################
PATH=/home/neteler/binaries/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin

GMAJOR=7
GMINOR=8
GPATCH=7 # required by grass-addons-index.sh
CURRENT_BRANCH=`curl https://api.github.com/repos/osgeo/grass/branches | grep release | grep '"name":' | cut -f4 -d'"' | sort -V | tail -n 1`
CURRENT_VERSION=`curl https://raw.githubusercontent.com/osgeo/grass/$CURRENT_BRANCH/include/VERSION`
CURRENT_MAJOR=`echo "$CURRENT_VERSION" | sed -n '1{p;q}'`
GMAJOR=`expr $CURRENT_MAJOR - 1`

BRANCH=`curl https://api.github.com/repos/osgeo/grass/branches | grep releasebranch_$GMAJOR | grep '"name":' | cut -f4 -d'"' | sort -V | tail -n 1`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always result in the same thing as CURRENT_BRANCH since GMAJOR is taken from CURRENT_BRANCH, no?


MAIN_VERSION=`curl https://raw.githubusercontent.com/osgeo/grass/$BRANCH/include/VERSION`

GMINOR=`echo "$MAIN_VERSION" | sed -n '2{p;q}'`
GPATCH=`echo "$MAIN_VERSION" | sed -n '3{p;q}' | sed 's/[^0-9]*//g'`
Comment on lines +44 to +47
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, minor is taken from the file while major is taken from the branch and used for the branch again. Why not getting the right branch and then the version numbers from there?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this all just to keep the two scripts in sync? I think the "current" thing is really relevant for the legacy, but here where the code can be simpler. Maybe I just needs to code comments to clarify.


DOTVERSION=$GMAJOR.$GMINOR
VERSION=$GMAJOR$GMINOR
GVERSION=$GMAJOR
Expand Down Expand Up @@ -128,7 +138,7 @@ cp -f *.csv $TARGETMAIN/uploads/grass/

#configure
echo "configuring"
configure_grass || (echo "$0: an error occurred" ; exit 1)
configure_grass || (echo "$0: an error occured" ; exit 1)
pwd
ARCH=`cat include/Make/Platform.make | grep ^ARCH | cut -d'=' -f2 | xargs`

Expand Down Expand Up @@ -168,15 +178,15 @@ echo "Injecting DuckDuckGo search field into manual main page..."
cp -p AUTHORS CHANGES CITING COPYING GPL.TXT INSTALL REQUIREMENTS.html $TARGETDIR/

# inject G8.x new version hint in a red box:
(cd $TARGETHTMLDIR/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the <a href=\"../../../grass82/manuals/$myfile\">current manual page</a>.</p>:g" $myfile ; done)
(cd $TARGETHTMLDIR/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the <a href=\"../../grass-stable/manuals/$myfile\">current manual page</a>.</p>:g" $myfile ; done)
# also for Python
(cd $TARGETHTMLDIR/libpython/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#FF2121; padding\: 1em;\">Note\: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the <a href=\"../../../../grass82/manuals/libpython/$myfile\">current Python manual page</a>.</p>:g" $myfile ; done)
(cd $TARGETHTMLDIR/libpython/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#FF2121; padding\: 1em;\">Note\: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the <a href=\"../../../grass-stable/manuals/libpython/$myfile\">current Python manual page</a>.</p>:g" $myfile ; done)

# SEO: inject canonical link in all (old) manual pages to point to latest stable (avoid duplicate content SEO punishment)
# see https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
(cd $TARGETHTMLDIR/ ; for myfile in `ls *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass82/manuals/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/addons/ ; for myfile in `ls *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass82/manuals/addons/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/libpython/ ; for myfile in `ls *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass82/manuals/libpython/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/ ; for myfile in `ls *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass-stable/manuals/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/addons/ ; for myfile in `ls *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass-stable/manuals/addons/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/libpython/ ; for myfile in `ls *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass-stable/manuals/libpython/$myfile\">\n</head>:g" $myfile ; done)

# clean wxGUI sphinx manual etc
(cd $GRASSBUILDDIR/ ; $MYMAKE cleansphinx)
Expand Down Expand Up @@ -257,7 +267,7 @@ sh ~/cronjobs/compile_addons_git.sh $GMAJOR \
~/src/$BRANCH/bin.$ARCH/grass$VERSION \
1
mkdir -p $TARGETHTMLDIR/addons/
# copy individual addon html files into one target dir if compiled addon
# copy indvidual addon html files into one target dir if compiled addon
# has own dir e.g. ~/.grass7/addons/db.join/ with bin/ docs/ etc/ scripts/
# subdir
for dir in `find ~/.grass$GMAJOR/addons -maxdepth 1 -type d`; do
Expand All @@ -269,12 +279,13 @@ for dir in `find ~/.grass$GMAJOR/addons -maxdepth 1 -type d`; do
fi
fi
done

sh ~/cronjobs/grass-addons-index.sh $GMAJOR $GMINOR $GPATCH $TARGETHTMLDIR/addons/
chmod -R a+r,g+w $TARGETHTMLDIR 2> /dev/null

# inject G8.x new version hint in a red box: into index.html and all addon manual pages
(cd $TARGETHTMLDIR/addons/ ; sed -i -e "s: Addons Manual pages</h2>: Addons Manual pages</h2><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This addon documentation is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the <a href=\"../../../grass82/manuals/addons/index.html\">current addon manual page</a>.</p>:g" index.html)
(cd $TARGETHTMLDIR/addons/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the <a href=\"../../../../grass82/manuals/addons/$myfile\">current addon manual page</a>.</p>:g" $myfile ; done)
(cd $TARGETHTMLDIR/addons/ ; sed -i -e "s: Addons Manual pages</h2>: Addons Manual pages</h2><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This addon documentation is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the <a href=\"../../../grass-stable/manuals/addons/index.html\">current addon manual page</a>.</p>:g" index.html)
(cd $TARGETHTMLDIR/addons/ ; for myfile in `ls *.html` ; do sed -i -e "s:<hr class=\"header\">:<hr class=\"header\"><p style=\"border\:3px; border-style\:solid; border-color\:#BC1818; padding\: 1em;\">Note\: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the <a href=\"../../../grass-stable/manuals/addons/$myfile\">current addon manual page</a>.</p>:g" $myfile ; done)


# cp logs from ~/.grass$GMAJOR/addons/logs/
mkdir -p $TARGETMAIN/addons/grass$GMAJOR/logs/
Expand All @@ -289,17 +300,9 @@ export ARCH
export ARCH_DISTDIR=$GRASSBUILDDIR/dist.$ARCH
export GISBASE=$ARCH_DISTDIR
export VERSION_NUMBER=$DOTVERSION
python3 $GRASSBUILDDIR/man/build_keywords.py $TARGETHTMLDIR/ $TARGETHTMLDIR/addons/
python3 $GRASSBUILDDIR/man/build_keywords.py $TARGETMAIN/grass$GMAJOR$GMINOR/manuals/ $TARGETMAIN/grass$GMAJOR$GMINOR/manuals/addons/
unset ARCH ARCH_DISTDIR GISBASE VERSION_NUMBER

# canonical: once again after addon manual (re)creation, only where missing
# SEO: inject canonical link in all (old) manual pages to point to latest stable (avoid duplicate content SEO punishment)
# see https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
(cd $TARGETHTMLDIR/ ; for myfile in `grep -L 'link rel="canonical"' *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass82/manuals/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/addons/ ; for myfile in `grep -L 'link rel="canonical"' *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass82/manuals/addons/$myfile\">\n</head>:g" $myfile ; done)
(cd $TARGETHTMLDIR/libpython/ ; for myfile in `grep -L 'link rel="canonical"' *.html` ; do sed -i -e "s:</head>:<link rel=\"canonical\" href=\"https\://grass.osgeo.org/grass82/manuals/libpython/$myfile\">\n</head>:g" $myfile ; done)


############################################
# create sitemaps to expand the hugo sitemap

Expand All @@ -309,7 +312,7 @@ python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var
############################################
# cleanup
cd $GRASSBUILDDIR
$MYMAKE distclean > /dev/null || (echo "$0: an error occurred" ; exit 1)
$MYMAKE distclean > /dev/null || (echo "$0: an error occured" ; exit 1)

echo "Finished GRASS $VERSION $ARCH compilation."
echo "Written to: $TARGETDIR"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# script to build GRASS sources package from git relbranch of 7.8
# script to build GRASS sources package from git relbranch of 7.X
# (c) GPL 2+ Markus Neteler <neteler@osgeo.org>
# Markus Neteler 2002, 2003, 2005, 2006, 2007, 2008, 2012, 2014, 2015, 2016, 2017, 2018, 2019, 2020
#
Expand All @@ -15,16 +15,26 @@
###################################################################

MAINDIR=/home/neteler
GMAJOR=7
GMINOR=8

CURRENT_BRANCH=`curl https://api.github.com/repos/osgeo/grass/branches | grep release | grep '"name":' | cut -f4 -d'"' | sort -V | tail -n 1`
CURRENT_VERSION=`curl https://raw.githubusercontent.com/osgeo/grass/$CURRENT_BRANCH/include/VERSION`
CURRENT_MAJOR=`echo "$CURRENT_VERSION" | sed -n '1{p;q}'`
GMAJOR=`expr $CURRENT_MAJOR - 1`

BRANCH=`curl https://api.github.com/repos/osgeo/grass/branches | grep releasebranch_$GMAJOR | grep '"name":' | cut -f4 -d'"' | sort -V | tail -n 1`

MAIN_VERSION=`curl https://raw.githubusercontent.com/osgeo/grass/$BRANCH/include/VERSION`

GMINOR=`echo "$MAIN_VERSION" | sed -n '2{p;q}'`

GVERSION=$GMAJOR.$GMINOR.git
DOTVERSION=$GMAJOR.$GMINOR
GSHORTGVERSION=$GMAJOR$GMINOR

###################
# where to find the GRASS sources (git clone):
SOURCE=$MAINDIR/src/
BRANCH=releasebranch_${GMAJOR}_${GMINOR}

# where to put the resulting .tar.gz file:
TARGETMAIN=/var/www/code_and_data/
TARGETDIR=$TARGETMAIN/grass${GSHORTGVERSION}/source/snapshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@
#################################
PATH=/home/neteler/binaries/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin

GMAJOR=8
GMINOR=3
GPATCH="dev"
BRANCH=main
MAIN_VERSION=`curl https://raw.githubusercontent.com/osgeo/grass/$BRANCH/include/VERSION`

GMAJOR=`echo "$MAIN_VERSION" | sed -n '1{p;q}'`
GMINOR=`echo "$MAIN_VERSION" | sed -n '2{p;q}'`
GPATCH=`echo "$MAIN_VERSION" | sed -n '3{p;q}'`

DOTVERSION=$GMAJOR.$GMINOR
VERSION=$GMAJOR$GMINOR
GVERSION=$GMAJOR
Expand All @@ -55,6 +59,7 @@ SOURCE=$MAINDIR/src/
BRANCH=main
GRASSBUILDDIR=$SOURCE/$BRANCH
TARGETMAIN=/var/www/code_and_data

TARGETDIR=$TARGETMAIN/grass${VERSION}/binary/linux/snapshot
TARGETHTMLDIR=$TARGETMAIN/grass${VERSION}/manuals/

Expand Down Expand Up @@ -83,7 +88,11 @@ configure_grass()
# --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \

# cleanup
rm -f config_$GMAJOR.$GMINOR.git_log.txt
rm -rf man/__pycache__/ python/libgrass_interface_generator/ctypesgen/parser/__pycache__/ \
python/libgrass_interface_generator/ctypesgen/printer_json/__pycache__/ \
python/libgrass_interface_generator/ctypesgen/printer_python/__pycache__/ \
python/libgrass_interface_generator/ctypesgen/processor/__pycache__/ \
config_$GMAJOR.$GMINOR.git_log.txt

# reset i18N POT files
git checkout locale/templates/*.pot
Expand Down Expand Up @@ -137,7 +146,7 @@ cp -f *.csv $TARGETMAIN/uploads/grass/

#configure
echo "configuring"
configure_grass || (echo "$0: an error occurred" ; exit 1)
configure_grass || (echo "$0: an error occured" ; exit 1)
pwd
ARCH=`cat include/Make/Platform.make | grep ^ARCH | cut -d'=' -f2 | xargs`

Expand Down Expand Up @@ -182,8 +191,8 @@ cp -p AUTHORS CHANGES CITING COPYING GPL.TXT INSTALL REQUIREMENTS.html $TARGETDI
############
# generate doxygen programmers's G8 manual
cd $GRASSBUILDDIR/
#$MYMAKE htmldocs-single > /dev/null || (echo "$0 htmldocs-single: an error occurred" ; exit 1)
$MYMAKE htmldocs-single || (echo "$0 htmldocs-single: an error occurred" ; exit 1)
#$MYMAKE htmldocs-single > /dev/null || (echo "$0 htmldocs-single: an error occured" ; exit 1)
$MYMAKE htmldocs-single || (echo "$0 htmldocs-single: an error occured" ; exit 1)

cd $GRASSBUILDDIR/

Expand Down Expand Up @@ -283,7 +292,7 @@ sh ~/cronjobs/compile_addons_git.sh $GMAJOR \
~/src/$BRANCH/bin.$ARCH/grass \
1
mkdir -p $TARGETHTMLDIR/addons/
# copy individual addon html files into one target dir if compiled addon
# copy indvidual addon html files into one target dir if compiled addon
# has own dir e.g. ~/.grass8/addons/db.join/ with bin/ docs/ etc/ scripts/
# subdir
for dir in `find ~/.grass$GMAJOR/addons -maxdepth 1 -type d`; do
Expand All @@ -296,11 +305,7 @@ for dir in `find ~/.grass$GMAJOR/addons -maxdepth 1 -type d`; do
fi
done
sh ~/cronjobs/grass-addons-index.sh $GMAJOR $GMINOR $GPATCH $TARGETHTMLDIR/addons/
cp $TARGETHTMLDIR/grass_logo.png \
$TARGETHTMLDIR/hamburger_menu.svg \
$TARGETHTMLDIR/hamburger_menu_close.svg \
$TARGETHTMLDIR/grassdocs.css \
$TARGETHTMLDIR/addons/
cp $TARGETHTMLDIR/grass_logo.png $TARGETHTMLDIR/grassdocs.css $TARGETHTMLDIR/addons/
chmod -R a+r,g+w $TARGETHTMLDIR 2> /dev/null

# cp logs from ~/.grass$GMAJOR/addons/logs/
Expand Down Expand Up @@ -328,7 +333,7 @@ python3 $HOME/src/grass$GMAJOR-addons/utils/create_manuals_sitemap.py --dir=/var
############################################
# cleanup
cd $GRASSBUILDDIR
$MYMAKE distclean > /dev/null || (echo "$0: an error occurred" ; exit 1)
$MYMAKE distclean > /dev/null || (echo "$0: an error occured" ; exit 1)
rm -rf lib/html/ lib/latex/

echo "Finished GRASS $VERSION $ARCH compilation."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@
###################################################################

MAINDIR=/home/neteler
GMAJOR=8
GMINOR=3

BRANCH=main
MAIN_VERSION=`curl https://raw.githubusercontent.com/osgeo/grass/$BRANCH/include/VERSION`

GMAJOR=`echo "$MAIN_VERSION" | sed -n '1{p;q}'`
GMINOR=`echo "$MAIN_VERSION" | sed -n '2{p;q}'`

GVERSION=$GMAJOR.$GMINOR.git
DOTVERSION=$GMAJOR.$GMINOR
GSHORTGVERSION=$GMAJOR$GMINOR

###################
# where to find the GRASS sources (git clone):
SOURCE=$MAINDIR/src/
BRANCH=main
# where to put the resulting .tar.gz file:
TARGETMAIN=/var/www/code_and_data/
TARGETDIR=$TARGETMAIN/grass${GSHORTGVERSION}/source/snapshot
Expand Down
Loading