Fix link to moulinette and ssowat

This commit is contained in:
Kay0u 2020-03-21 18:15:33 +01:00
parent e6708f5012
commit f94f29b2d4
No known key found for this signature in database
GPG key ID: 7FF262C033518333

20
run.sh
View file

@ -16,9 +16,13 @@ link_moulinette_from_git() {
moulinette_dir="/tmp/ci_moulinette" moulinette_dir="/tmp/ci_moulinette"
lxc exec "$CONTAINER_ID" -- sh -c "mkdir $moulinette_dir" lxc exec "$CONTAINER_ID" -- sh -c "mkdir $moulinette_dir"
lxc exec "$CONTAINER_ID" -- sh -c "git clone https://github.com/YunoHost/moulinette $moulinette_dir" lxc exec "$CONTAINER_ID" -- sh -c "git clone https://github.com/YunoHost/moulinette $moulinette_dir"
lxc exec "$CONTAINER_ID" -- sh -c "pushd $moulinette_dir" lxc exec "$CONTAINER_ID" -- sh -c "(cd $moulinette_dir; \
lxc exec "$CONTAINER_ID" -- sh -c "if git ls-remote --heads | grep -q $CURRENT_BRANCH; then git checkout $CURRENT_BRANCH; else git checkout $DEFAULT_BRANCH; fi" if git ls-remote --heads | grep -q $CURRENT_BRANCH; \
lxc exec "$CONTAINER_ID" -- sh -c "popd" then \
git checkout $CURRENT_BRANCH; \
else \
git checkout $DEFAULT_BRANCH; \
fi)"
create_sym_link "$moulinette_dir/locales" "/usr/share/moulinette/locale" create_sym_link "$moulinette_dir/locales" "/usr/share/moulinette/locale"
create_sym_link "$moulinette_dir/moulinette" "/usr/lib/python2.7/dist-packages/moulinette" create_sym_link "$moulinette_dir/moulinette" "/usr/lib/python2.7/dist-packages/moulinette"
@ -28,9 +32,13 @@ link_ssowat_from_git() {
ssowat_dir="/tmp/ci_ssowat" ssowat_dir="/tmp/ci_ssowat"
lxc exec "$CONTAINER_ID" -- sh -c "mkdir $ssowat_dir" lxc exec "$CONTAINER_ID" -- sh -c "mkdir $ssowat_dir"
lxc exec "$CONTAINER_ID" -- sh -c "git clone https://github.com/YunoHost/ssowat $ssowat_dir" lxc exec "$CONTAINER_ID" -- sh -c "git clone https://github.com/YunoHost/ssowat $ssowat_dir"
lxc exec "$CONTAINER_ID" -- sh -c "pushd $ssowat_dir" lxc exec "$CONTAINER_ID" -- sh -c "(cd $ssowat_dir; \
lxc exec "$CONTAINER_ID" -- sh -c "if git ls-remote --heads | grep -q $CURRENT_BRANCH; then git checkout $CURRENT_BRANCH; else git checkout $DEFAULT_BRANCH; fi" if git ls-remote --heads | grep -q $CURRENT_BRANCH; \
lxc exec "$CONTAINER_ID" -- sh -c "popd" then \
git checkout $CURRENT_BRANCH; \
else \
git checkout $DEFAULT_BRANCH; \
fi)"
create_sym_link "$ssowat_dir" "/usr/share/ssowat" create_sym_link "$ssowat_dir" "/usr/share/ssowat"
} }