add versioning to plugin repo

This commit is contained in:
zotlabs 2019-08-04 18:25:15 -07:00
parent 79fbccdce7
commit c961457060
3 changed files with 12 additions and 13 deletions

View file

@ -45,7 +45,7 @@ require_once('include/items.php');
define ( 'STD_VERSION', '3.5' );
define ( 'STD_VERSION', '19.8.5' );
define ( 'ZOT_REVISION', '6.0' );
define ( 'DB_UPDATE_VERSION', 1234 );

View file

@ -7,17 +7,6 @@ if [ $# -lt 2 ]; then
exit 1
fi
#if [[ $1 != *"//github.com/redmatrix"* && $3 != 'insecure' ]]; then
# echo "";
# echo "This is NOT an official project repository.";
# echo "In order to protect you from unverified and";
# echo "possibly malicious content, this repository";
# echo "will not be linked to your site unless you";
# echo "append the word 'insecure' to the command.";
# echo "";
# exit 1
#fi
mkdir -p extend/addon/$2
mkdir addon > /dev/null 2>&1
git clone $1 extend/addon/$2
@ -29,6 +18,11 @@ filelist=(`ls extend/addon/$2`)
cd addon
for a in "${filelist[@]}" ; do
if [ $a = 'version.php' ]; then
if [ ! -x 'version.php' ]; then
ln -s ../extend/addon/$2/version.php version.php
fi
fi
base=`basename $a`
if [ $base = '.git' ]; then
# echo 'ignoring git'

View file

@ -27,6 +27,11 @@ filelist=(`ls extend/addon/$1`)
cd addon
for a in "${filelist[@]}" ; do
if [ $a = 'version.php' ]; then
if [ ! -x 'version.php' ]; then
ln -s ../extend/addon/$1/version.php version.php
fi
fi
base=`basename $a`
if [ $base = '.git' ]; then
# echo 'ignoring git'
@ -35,7 +40,7 @@ for a in "${filelist[@]}" ; do
if [ ! -d ../extend/addon/$1/$base ]; then
# echo $a 'not a directory'
continue;
fi
fi
if [ -x $base ]; then
# echo $base 'file exists'
continue;