Browse Source

updating the scripts and fixing things

pull/1/head
Mike Dugan 10 years ago
parent
commit
a8eb18dd73
  1. 2
      .env.example.php
  2. 3
      .gitignore
  3. 5
      Vagrantfile
  4. 0
      app/storage/.gitignore
  5. 0
      app/storage/cache/.gitignore
  6. 0
      app/storage/logs/.gitignore
  7. 0
      app/storage/meta/.gitignore
  8. 0
      app/storage/sessions/.gitignore
  9. 0
      app/storage/views/.gitignore
  10. 2
      bootstrap/start.php
  11. 8
      readme.md
  12. 18
      scripts/aliases
  13. 9
      scripts/aliases.sh
  14. 8
      scripts/app.sh
  15. 34
      scripts/environment.sh
  16. 7
      scripts/workbench.sh

2
.env.example.php

@ -4,4 +4,4 @@ return [
'db_name' => 'flarum',
'db_user' => 'root',
'db_pass' => 'root'
]
];

3
.gitignore vendored

@ -8,3 +8,6 @@ composer.lock
.DS_Store
Thumbs.db
workbench/*
.vagrant
**/npm-debug.log
public/packages/flarum

5
Vagrantfile vendored

@ -293,7 +293,7 @@ Vagrant.configure("2") do |config|
config.vm.provision "shell", path: "#{github_url}/scripts/composer.sh", privileged: false, args: composer_packages.join(" ")
# Provision Laravel
config.vm.provision "shell", path: "#{github_url}/scripts/laravel.sh", privileged: false, args: [server_ip, laravel_root_folder, public_folder, laravel_version]
#config.vm.provision "shell", path: "#{github_url}/scripts/laravel.sh", privileged: false, args: [server_ip, laravel_root_folder, public_folder, laravel_version]
# Provision Symfony
# config.vm.provision "shell", path: "#{github_url}/scripts/symfony.sh", privileged: false, args: [server_ip, symfony_root_folder, public_folder]
@ -315,7 +315,6 @@ Vagrant.configure("2") do |config|
# Any local scripts you may want to run post-provisioning.
# Add these to the same directory as the Vagrantfile.
##########
config.vm.provision "shell", path: "./scripts/environment.sh"
config.vm.provision "shell", path: "./scripts/workbench.sh"
config.vm.provision "shell", path: "./scripts/environment.sh", privileged: false
end

0
app/storage/.gitignore vendored

0
app/storage/cache/.gitignore vendored

0
app/storage/logs/.gitignore vendored

0
app/storage/meta/.gitignore vendored

0
app/storage/sessions/.gitignore vendored

0
app/storage/views/.gitignore vendored

2
bootstrap/start.php

@ -26,7 +26,7 @@ $app = new Illuminate\Foundation\Application;
$env = $app->detectEnvironment(array(
'local' => array('homestead', 'FlarumVm','Mikes-iMac-2.local'),
'local' => array('homestead', 'flarum','Mikes-iMac-2.local'),
));

8
readme.md

@ -1 +1,9 @@
#Flarum Skeleton App
This application is a skeleton for https://github.com/flarum/core - it will set up the application and install dependencies in a Vagrant box.
## Instructions
````
git clone git@github.com:mikedugan/flarum-app
cd flarum-app
vagrant up
````

18
scripts/aliases

@ -32,9 +32,11 @@ alias cca='./vendor/bin/codecept Acceptance'
alias ccf='./vendor/bin/codecept Functional'
alias ccu='./vendor/bin/codecept run Unit'
#ember/js stuff
alias esv='ember serve --output-path="/vagrant/workbench/flarum/core/public"
#function aliases
alias ghc=ghc
alias mkcd=mkcd
alias grl=grl
alias grln=grln
alias gac=gac
@ -66,17 +68,3 @@ gulpac() {
}
grl() { grep -rl "$1" * }
mkcd() {
if [ -z $1 ]; then
echo -e \e[0;31;1mUsage: mkcd [directory]\e[m;
else
if [ -d $1 ]; then
echo Changed to $1.;
cd $1;
else
mkdir $1;
echo Created $1;
cd $1;
fi;
fi
}

9
scripts/aliases.sh

@ -1,9 +0,0 @@
#! /bin/bash
cp /vagrant/scripts/aliases ~/.aliases
if [ -e "/home/vagrant/.zshrc" ]
then
echo "source ~/.aliases" >> ~/.zshrc
else
echo "source ~/.aliases" >> ~/.bashrc
fi

8
scripts/app.sh

@ -1,8 +0,0 @@
#! /bin/bash
cd /vagrant
php artisan migrate --bench="flarum/core"
php artisan db:seed --class="Flarum\Core\Support\Seeders\DatabaseSeeder"
cd /vagrant/workbench/flarum/core/ember
npm install
bower install

34
scripts/environment.sh

@ -1,9 +1,33 @@
#! /bin/bash
cp /vagrant/.env.example.php /vagrant/.env.local.php
su - vagrant
### Setup NPM globals and create necessary directories ###
sudo apt-get install phantomjs zsh exuberant-ctags
curl -L http://install.ohmyz.sh | sh
## Comment the below line out if you don't want zsh
chsh /bin/zsh vagrant
mkdir /home/vagrant/npm
mkdir -p /vagrant/workbench/flarum/core
sudo chown -R vagrant:vagrant /home/vagrant
npm install -g bower ember
cp /vagrant/scripts/aliases ~/.aliases
### Create rc file ###
if [ -e "/home/vagrant/.zshrc" ]
then
echo "source ~/.aliases" >> ~/.zshrc
else
echo "source ~/.aliases" >> ~/.bashrc
fi
### Set up environment files and database ###
cp /vagrant/.env.example.php /vagrant/.env.local.php
mysql -u root -proot -e 'create database flarum'
### Setup flarum/core ###
cd /vagrant/workbench/flarum/core
git clone https://github.com/flarum/core .
composer install
cd /vagrant/workbench/flarum/core/ember
npm install
bower install
bash /vagrant/scripts/aliases.sh
cd /vagrant
php artisan migrate --bench="flarum/core"
php artisan db:seed --class="Flarum\Core\Support\Seeders\DatabaseSeeder"

7
scripts/workbench.sh

@ -1,7 +0,0 @@
#! /bin/bash
mkdir -p /vagrant/workbench/flarum/core
cd /vagrant/workbench/flarum/core
git clone https://github.com/flarum/core .
bash /vagrant/scripts/app.sh
Loading…
Cancel
Save