move git url in project.gitref change init.sh

- init.sh now parse project.gitref
- generate project.gitref that contains git dependencies
./printclonesdep.sh >project.gitref
- update fetch_dependencies
This commit is contained in:
philippe lhardy
2023-07-28 12:04:15 +02:00
parent a22a2fd1b6
commit f76f9e17fb
3 changed files with 73 additions and 15 deletions

View File

@@ -18,7 +18,6 @@ log_info()
fetch_jackson_databind()
{
libversion_jackson_databind=2.12.0
lib_jackson_databind=jackson-databind-${libversion_jackson_databind}.jar
if [[ ! -e libs/$lib_jackson_databind ]]
then
@@ -29,11 +28,16 @@ fetch_jackson_databind()
fi
}
libversion_jackson_databind=2.12.0
sharedrawweb_git_url="ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/sharedrawweb"
libversion_artgaphic=0.2.0
lib_artgaphic=artgaphics-${libversion_artgaphic}.jar
if [[ ! -d ../sharedrawweb ]]
then
log_error "expected a sharedrawweb project parent ( for exports ). Please clone related project."
sharedrawweb_git_url="ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/sharedrawweb"
log_info "cd ..; git clone sharedrawweb_git_url"
log_info "cd ..; git clone $sharedrawweb_git_url"
fi
if [[ ! -d libs ]]
@@ -41,11 +45,15 @@ then
mkdir libs
fi
libversion_artgaphic=0.2.0
lib_artgaphic=artgaphics-${libversion_artgaphic}.jar
if [[ ! -e libs/$lib_artgaphic ]]
then
ln -s ../../sharedrawweb/dist/lib/$lib_artgaphic libs/
lib_artgaphic_source_file=../../sharedrawweb/dist/lib/$lib_artgaphic
if [[ -f $lib_artgaphic_source_file ]]
then
ln -s $lib_artgaphic_source_file libs/
else
log_error "Missing $lib_artgaphic_source_file. It is require to build it sharedrawweb project first"
fi
fi
if [[ -n $use_jackson ]]

53
init.sh
View File

@@ -1,11 +1,46 @@
#!/bin/bash
if [[ ! -d artlog_toolbox ]]
then
git clone https://github.com/artlog/artlog_toolbox.git artlog_toolbox
fi
pushd artlog_toolbox
git checkout master
popd
artlog_toolbox/deploy.sh
./doit.sh
setup()
{
artlog_toolbox_path=../artlog_toolbox
if [[ ! -d $artlog_toolbox_path ]]
then
git clone $artlog_toolbox_remote_origin_url $artlog_toolbox_path
pushd $artlog_toolbox_path
git checkout
popd
fi
$artlog_toolbox_path/deploy.sh
}
# parses project.gitref
project=
gitref=project.gitref
while read line
do
if [[ $line =~ \[([_a-z]*)\] ]]
then
project=${BASH_REMATCH[1]}
elif [[ $line =~ remote.origin.url=(.*) ]]
then
remote_origin_url=${BASH_REMATCH[1]}
echo "$project $remote_origin_url"
case $project in
sharedrawweb)
sharedrawweb_remote_origin_url=$remote_origin_url
;;
artloglaby)
artloglaby_remote_origin_url=$remote_origin_url
;;
artlog_toolbox)
artlog_toolbox_remote_origin_url=$remote_origin_url
;;
*)
echo "ERROR unrecognized project='$project' line='$line'"
;;
esac
fi
done <$gitref
setup

15
project.gitref Normal file
View File

@@ -0,0 +1,15 @@
#
# root.absolute=/home/plhardy/artisanlogiciel/testbed/laby
# date=ven. 28 juil. 2023 11:59:40 CEST
[artloglaby]
path=.
remote.origin.url=ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/laby
head=a22a2fd1b6eec74cd4a37f086ff01d46a50d8a9b
[sharedrawweb]
path=../sharedrawweb
remote.origin.url=ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/sharedrawweb
head=c217d96129b5f83c26c041f766718b6bdf93a2d6
[artlog_toolbox]
path=../artlog_toolbox
remote.origin.url=ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/artlog_toolbox
head=ea7e49c578d89ec4c7f41fd5b526e3ef4a8dbb37