RSS Feed
^__^

Silverstripe Setup Script

,

We thought we had to improve our SilverStripe setup script for our development environment.
So Max and me rewrote it to add submodules and some other improvements.

Just run:

./install_silverstripe.sh mynewproject tags/2.4.7

and you have

  • silverstripe project folder structure
  • the tutorial theme
  • a already filled git repository
  • sapphire as submodule
  • cms as submodule
  • Uploadify as submodule
  • DataObjectManager as submodule
  • UserForms as submodule

What you then still need to do is:

  • create the database
  • setup a local vhost
  • open your project url and run the install process
  • start to code

So here it is:

# install silverstripe + common modules from github
# usage sh install_silverstripe.sh <folder_name> <tag/branch>
# examples: 
# sh install_silverstripe.sh some_folder tags/2.4.5
# sh install_silverstripe.sh some_folder master

#set up project base folder
git clone git@github.com:silverstripe/silverstripe-installer.git $1
cd $1
git checkout $2
#we kill the .git because we want this repo just as starter and init our own repository (instead of export)
rm -rf .git

#set permissions for install
chmod 0777 assets assets/*
chmod 0666 .htaccess mysite/_config.php assets/*/*

git init

git submodule add git@github.com:silverstripe/silverstripe-cms.git cms
cd cms
git checkout $2
cd ..
git add cms
git commit -m "checked out submodule cms to $2"

git submodule add git@github.com:silverstripe/sapphire.git sapphire
cd sapphire
git checkout $2
cd ..
git add sapphire
git commit -m "checked out submodule sapphire to $2"

# add common modules
git submodule add git://github.com/unclecheese/Uploadify.git uploadify
git submodule add git://github.com/unclecheese/DataObjectManager.git dataobject_manager
git submodule add git://github.com/silverstripe/silverstripe-userforms.git userform

git submodule init
git submodule update

git add .
git commit -m "Initial Commit"

Leave a Reply

Your email address will not be published. Required fields are marked *