mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
Merge branch 'master' of https://github.com/YunoHost/ynh-dev
Conflicts: ynh-dev
This commit is contained in:
commit
9bdcc41203
2 changed files with 72 additions and 4 deletions
59
README.md
59
README.md
|
@ -1,2 +1,57 @@
|
|||
# yunohost-development
|
||||
An environement to develop on YunoHost
|
||||
# ynh-dev, a yunohost dev env
|
||||
This script is a cli to manage a yunohost development environement. With this you can develop on the unstable version of yunohost quickly.
|
||||
|
||||
## Setup
|
||||
Install dependencies
|
||||
```shell
|
||||
# Debian, Ubuntu, Mint
|
||||
sudo apt-get install docker vagrant
|
||||
# Fedora
|
||||
sudo dnf install docker vagrant vagrant-libvirt
|
||||
```
|
||||
|
||||
Next upload ynh-dev script
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/zamentur/yunohost-development/master/ynh-dev
|
||||
chmod u+x ynh-dev
|
||||
```
|
||||
## Usage
|
||||
### Create the environment
|
||||
|
||||
```shell
|
||||
ynh-dev create-env PATH
|
||||
```
|
||||
|
||||
### Run a container
|
||||
```
|
||||
ynh-dev run ynh.local virtualbox testing8
|
||||
```
|
||||
|
||||
### Upgrade the container
|
||||
```
|
||||
ynh-dev upgrade
|
||||
```
|
||||
|
||||
### Deploy your change
|
||||
```
|
||||
ynh-dev deploy
|
||||
```
|
||||
|
||||
### Deploy your change in realtime (each time you saved source code)
|
||||
```
|
||||
ynh-dev watch
|
||||
```
|
||||
## Useful command
|
||||
### Get ip address of your vm
|
||||
```
|
||||
ynh-dev ip
|
||||
```
|
||||
|
||||
### Get ip address of your vm
|
||||
```
|
||||
ynh-dev ip
|
||||
```
|
||||
## More info
|
||||
|
||||
https://yunohost.org/#/dev_fr
|
||||
|
|
17
ynh-dev
17
ynh-dev
|
@ -30,6 +30,7 @@ PAQUET :
|
|||
|
||||
VM
|
||||
docker
|
||||
vagrant
|
||||
virtualbox
|
||||
|
||||
VERSION
|
||||
|
@ -68,9 +69,20 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "help" ]; then
|
|||
usage
|
||||
|
||||
elif [ "$1" = "create-env" ]; then
|
||||
set -x
|
||||
|
||||
#Create a development environment
|
||||
pwd=`pwd`
|
||||
|
||||
if [ ! "$2" ]
|
||||
then
|
||||
echo "I need a destination folder to create the dev environement"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -e "$2" ] || mkdir -p $2
|
||||
cd $2
|
||||
|
||||
mkdir -p apps
|
||||
mkdir -p backup
|
||||
git clone -b unstable https://github.com/Kloadut/SSOwat SSOwat
|
||||
|
@ -78,9 +90,9 @@ elif [ "$1" = "create-env" ]; then
|
|||
git clone -b unstable https://github.com/YunoHost/yunohost yunohost
|
||||
git clone -b unstable https://github.com/YunoHost/moulinette moulinette
|
||||
git clone https://github.com/YunoHost/Dockerfile Dockerfile
|
||||
git clone https://github.com/zamentur/yunohost-vagrant yunohost-vagrant
|
||||
git clone https://github.com/YunoHost/Vagrantfile vagrant
|
||||
cp $pwd/$0 ./$0
|
||||
ln -s yunohost-vagrant/Vagrantfile Vagrantfile
|
||||
ln -s vagrant/Vagrantfile Vagrantfile
|
||||
|
||||
elif [ "$1" = "run" ]; then
|
||||
#Run a vm and give a prompt
|
||||
|
@ -137,6 +149,7 @@ elif [ "$1" = "deploy" ]; then
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue