[fix] Remove old deploy & watch commands.

This commit is contained in:
opi 2016-05-03 14:36:13 +02:00
parent 707162eb79
commit e08c05776d
2 changed files with 7 additions and 56 deletions

View file

@ -50,7 +50,7 @@ advantages of the `ynh-dev` script.
### Upgrade the container
It will update every debian packages.
It will update every debian packages, including YunoHost ones.
/vagrant/ynh-dev upgrade
@ -70,18 +70,16 @@ moulinette, yunohost-admin)
/vagrant/ynh-dev use-git PACKAGE_NAME
### Deploy your change
/vagrant/ynh-dev deploy
### Deploy your change in realtime (each time you saved source code)
/vagrant/ynh-dev watch
### Get ip address of your vm
/vagrant/ynh-dev ip
### Update `ynh-dev` script
/vagrant/ynh-dev self-update
## More info
[yunohost.org/dev_fr](https://yunohost.org/dev_fr) (in french)

47
ynh-dev
View file

@ -19,10 +19,6 @@ Usage :
Upgrade the container
`basename $0` use-git [PACKAGES [PACKAGES ...]]
Use Git repositories from dev environment path
`basename $0` deploy [PACKAGES [PACKAGES ...]]
Deploy sources to test it
`basename $0` watch [PACKAGES [PACKAGES ...]]
Deploy sources each time there is change
`basename $0` self-update
Update this script (`basename $0`)
@ -162,7 +158,6 @@ elif [ "$1" = "upgrade" ]; then
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get install -y inotify-tools
#######################
@ -267,48 +262,6 @@ elif [ "$1" = "use-git" ]; then
esac
done
elif [ "$1" = "deploy" ]; then
check_yunohost_vm
for i in ${!packages[@]}; do
case ${packages[i]} in
moulinette)
# Install moulinette
cd $BASE_DIR/moulinette
./setup.py install
cd ..
[ -e "./cache/moulinette/actionsmap/yunohost.pkl" ] && rm /var/cache/moulinette/actionsmap/yunohost.pkl
echo "moulinette deployed"
;;
ssowat)
# Install ssowat
sed "s@^@cp -Rf $BASE_DIR/SSOwat/@" $BASE_DIR/SSOwat/debian/install | source /dev/stdin
service nginx stop || true
service nginx start || echo 'Fail to restart nginx'
echo "ssowat deployed"
;;
yunohost)
# Install yunohost
cat $BASE_DIR/yunohost/debian/install | awk '{print "mkdir -p " $2}' | source /dev/stdin
sed "s@^@cp -Rf $BASE_DIR/yunohost/@" $BASE_DIR/yunohost/debian/install | source /dev/stdin
service yunohost-api restart || echo 'Fail to restart yunohost-api'
echo "yunohost deployed"
;;
yunohost-admin)
# Install yunohost-admin
sed "s@^@cp -Rf $BASE_DIR/yunohost-admin/@" $BASE_DIR/yunohost-admin/debian/install | source /dev/stdin
echo "yunohost-admin deployed"
;;
esac
done
elif [ "$1" = "watch" ]; then
check_yunohost_vm
sudo apt-get install -y inotify-tools
while inotifywait -r -e close_write $BASE_DIR/moulinette/ $BASE_DIR/SSOwat/ $BASE_DIR/yunohost/ $BASE_DIR/yunohost-admin/; do
$BASE_DIR/$0 deploy ${@:2};
done
elif [ "$1" = "self-update" ]; then
check_yunohost_vm