Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 71e994d

Browse files
committed
Merge branch 'release/1.2.3'
2 parents d8afeaa + ec4239d commit 71e994d

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

Vagrantfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ VagrantApp::Config.option(:varnish, false) # If varnish needs to be enabled
4141
.option(:unison_guest, 'project') # Directory for project code
4242
.option(:unison_ignore, 'Name {.DS_Store,.git}') # Unison ignore pattern
4343
.option(:unison_manage_permissions, false) # Unison manage permissions
44+
.option(:unison, mount_plugin == 'vagrant-unison2') # Unison plugin installation
4445
.option(:network, '33.33.33.0/24') # Directory to be used as mount on host machine
4546

4647
Vagrant.configure("2") do |config|
@@ -60,6 +61,7 @@ Vagrant.configure("2") do |config|
6061
.shell_add('magento2-install.sh', [:magento2, :install]) # M2 Installer, depends on :magento2 and :install
6162
.shell_add('magento2-developer.sh', [:magento2, :install, :developer]) # M2 Developer options, depends on :magento2, :install, :developer
6263
.shell_add('shell.sh', :shell) # Fish shell installer, depends on :shell flag
64+
.shell_add('unison.sh', :unison)
6365
.shell_add('hello.sh') # Final message with connection instructions
6466

6567
# Loads config.rb from the same directory where Vagrantfile is in
@@ -94,7 +96,7 @@ Vagrant.configure("2") do |config|
9496
# Disable default /vagrant mount as we use custom user for box
9597
config.vm.synced_folder '.', '/vagrant/', disabled: true
9698

97-
if mount_plugin == 'vagrant_nfs-guest'
99+
unless box_config.flag?(:unison)
98100
project_dir = 'magento2'
99101
else
100102
project_dir = box_config.get(:unison_guest)
@@ -110,7 +112,7 @@ Vagrant.configure("2") do |config|
110112
VAGRANT_FPM_SERVICE: box_config.flag?(:php7) ? 'php7.0-fpm' : 'php5-fpm',
111113
VAGRNAT_PHP_ETC_DIR: box_config.flag?(:php7) ? '/etc/php/7.0/' : '/etc/php5/',
112114
VAGRNAT_PHP_PACKAGE_PREFIX: box_config.flag?(:php7) ? 'php7.0' : 'php5',
113-
VAGRANT_PROJECT_DIR: box_config.get(:unison_guest)
115+
VAGRANT_PROJECT_DIR: project_dir
114116
}
115117
end
116118

@@ -125,7 +127,7 @@ Vagrant.configure("2") do |config|
125127
node.hostmanager.aliases = box_config.get(:domains)
126128

127129

128-
if mount_plugin == 'vagrant_nfs-guest'
130+
unless box_config.get(:unison)
129131
node.vm.synced_folder box_config.get(:directory), '/data/web', type: 'nfs_guest', create: true,
130132
linux__nfs_options: %w(rw no_subtree_check all_squash insecure async),
131133
map_uid: box_config.get(:uid).to_s,

vagrant/provisioning/hypernode.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ usermod -a -G admin app
3737
truncate -s 0 /etc/cgrules.conf
3838
cgdelete -r limited || true
3939

40-
apt-get install unison

vagrant/provisioning/magento2-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MAGENTO_DIR=${VAGRANT_PROJECT_DIR:-magento2}
99
cd ${HOME_DIR}/${MAGENTO_DIR}
1010

1111
MYSQLPASSWORD=$(awk -F "=" '/password/ {print $2}' ${HOME_DIR}/.my.cnf | sed -e 's/^[ \t]*//')
12-
mysql -u app -p${MYSQLPASSWORD} -e "create database magento2"
12+
[ -f ${HOME_DIR}/${MAGENTO_DIR}/app/etc/env.php ] || mysql -u app -p${MYSQLPASSWORD} -e "create database magento2"
1313

1414
echo "Downloading Magento 2..."
1515

vagrant/provisioning/unison.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
apt-get install python-software-properties
4+
add-apt-repository ppa:avsm/ppa
5+
apt-get update -y -f
6+
apt-get install ocaml opam -y
7+
8+
9+
mkdir -p /usr/src/unison/
10+
cd /usr/src/unison/
11+
12+
wget https://www.seas.upenn.edu/~bcpierce/unison/download/releases/unison-2.48.4/unison-2.48.4.tar.gz -O unison.tar.gz
13+
tar xzvf unison.tar.gz --strip-components 1
14+
make UISTYLE=text || true
15+
16+
chmod +x unison
17+
mv unison /usr/bin/
18+

0 commit comments

Comments
 (0)