#Symphony project builder These scripts allow you to use Symphony and Symphony extensions as subtrees to your own project.
###What is this:
There are 2 files:
- SymBuilder.sh
- AddExtension.sh
Symbuilder creates a new repository (your project) and adds Symphony-cms as a subtree and merges it into a web root (like public_html
)
From now on the symphony repository is a real part of your repository. (not a submodule). You can't push back to the original repo but you can pull from it! So when the Symphony repository is updates, you can pull those changes into your own repo.
Symbuilder copies AddExtension.sh into your project folder. This script allows you to add extensions to your project in the same way we just added Symphony.
###How does it work:
#####This is what SymBuilder.sh does:
./SymBuilder.sh [project name] [webroot]
- This creates the folder [project name] and runs git init in it. This is your project repository.
- It adds some files (.gitignore, .symbuilder, AddExtensions.sh) and commits those.
- Then it Adds a remote called symphony-2 from git://github.com/symphonycms/symphony-2.git
- Now it merges the symphony-2 / master branch using the "ours" strategy without committing(!)
- Now we read the symphony-2 / master into [webroot] and update the files here.
- Now we commit this merge to our project repository
The remote name, url and branch are configurable in the script. Default is:
SYM_REMOTE_NAME="symphony-2"
SYM_REMOTE_BRANCH="master"
SYM_GIT_URL="git://github.com/symphonycms/symphony-2.git"
#####This is what AddExtension.sh does:
./AddExtension.sh [extension name] [git url] [branch]
- It Adds a remote called [extension name] from
[git url]
- Now it merges the
[extension name]/[branch]
using the "ours" strategy without committing(!) - Now we read the
[extension name]/[branch]
into[webroot]/extensions/[extension name]
and update the files here. - Now we commit this merge to our project repository
#####This is what is missing: Submodules. Merging the remote into a path loses the correct submodule tracking… this is annoying, trying to work around this. For the time being copy the .gitmodules to your repo root and edit the paths:
[submodule "[webroot]/extensions/export_ensemble"]
path = [webroot]/extensions/export_ensemble
url = git://github.com/symphonycms/export_ensemble.git
[submodule "[webroot]/extensions/markdown"]
path = [webroot]/extensions/markdown
url = git://github.com/symphonycms/markdown.git
[submodule "[webroot]/extensions/maintenance_mode"]
path = [webroot]/extensions/maintenance_mode
url = git://github.com/symphonycms/maintenance_mode.git
[submodule "[webroot]/extensions/selectbox_link_field"]
path = [webroot]/extensions/selectbox_link_field
url = git://github.com/symphonycms/selectbox_link_field.git
[submodule "[webroot]/extensions/jit_image_manipulation"]
path = [webroot]/extensions/jit_image_manipulation
url = git://github.com/symphonycms/jit_image_manipulation.git
[submodule "[webroot]/extensions/profiledevkit"]
path = [webroot]/extensions/profiledevkit
url = git://github.com/symphonycms/profiledevkit.git
[submodule "[webroot]/extensions/debugdevkit"]
path = [webroot]/extensions/debugdevkit
url = git://github.com/symphonycms/debugdevkit.git
[submodule "[webroot]/extensions/xssfilter"]
path = [webroot]/extensions/xssfilter
url = git://github.com/symphonycms/xssfilter.git
This script is based on this Github Help article