Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mrimann/FLOW3Distributor
base: 8ed7a63a7b
...
head fork: mrimann/FLOW3Distributor
compare: da909bd7e8
Checking mergeability… Don't worry, you can still create the pull request.
  • 6 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 124 additions and 23 deletions.
  1. +120 −18 FLOW3Distributor.sh
  2. +4 −5 ideas.rst
View
138 FLOW3Distributor.sh
@@ -2,7 +2,7 @@
#
# This script is licensed under the MIT license.
#
-# Copyright (c) 2011 Mario Rimann <mario@rimann.org>
+# Copyright (c) 2011-2012 Mario Rimann <mario@rimann.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction,
@@ -21,27 +21,37 @@
#
-# Check if the target directory exists already and exit if it does
-if [[ -d Distribution ]]; then
- echo "Ooops, the directory \"Distribution\" seems to exist already!"
+# ask for the name of the distribution to create (target folder name)
+echo "How will your distribution be named (this will be the name of the directory containing the new Distribution):"
+read targetName
+
+if [ -z ${targetName} ]; then
+ echo "Oops, you did not specify a directory name, we won't get happy that way... Please try again."
exit 1
fi
+# Check if the target directory exists already and exit if it does
+if [[ -d ${targetName} ]]; then
+ echo "Ooops, the directory \"${targetName}\" seems to exist already!"
+ exit 2
+fi
+
# If we got that far, create the target directory
-mkdir Distribution
+mkdir ${targetName}
# Check if the directory for (temporarily) cloning the FLOW3 Base Distribution exists already
if [[ -d FLOW3_BaseDistribution ]]; then
echo "Ooops, the directory \"FLOW3_BaseDistribution\" seems to exist already - we can't clone into that directory then!"
- exit 2
+ exit 3
fi
echo "OK, seems we have a GO. Let's go Jolly Jumper"
+
# init the new distribution
-cd Distribution
+cd ${targetName}
git init
@@ -61,35 +71,127 @@ git submodule add git://git.typo3.org/FLOW3/BuildEssentials.git Build/Common
cd ../
git clone git://git.typo3.org/FLOW3/Distributions/Base.git FLOW3_BaseDistribution
-mv FLOW3_BaseDistribution/Web Distribution/
-mv FLOW3_BaseDistribution/flow3 Distribution/
-mv FLOW3_BaseDistribution/flow3.bat Distribution/
-mv FLOW3_BaseDistribution/Configuration Distribution/
+mv FLOW3_BaseDistribution/Web ${targetName}/
+mv FLOW3_BaseDistribution/flow3 ${targetName}/
+mv FLOW3_BaseDistribution/flow3.bat ${targetName}/
+mv FLOW3_BaseDistribution/Configuration ${targetName}/
rm -rf FLOW3_BaseDistribution
-cd Distribution
+# let's move on to the new distribution's directory and pimp it a bit
+echo "Now going to pimp the new distribution a bit..."
+cd ${targetName}
+
+
+# create our own Routes.yaml file
+echo "Now creating a custom Routes.yaml file"
+cat > Configuration/Routes.yaml << EOF
+##
+# FLOW3 subroutes
+#
+
+-
+ name: 'FLOW3'
+ uriPattern: '<FLOW3Subroutes>'
+ defaults:
+ '@format': 'html'
+ subRoutes:
+ FLOW3Subroutes:
+ package: TYPO3.FLOW3
+EOF
+
# ask whether the Admin package should be integrated
echo
echo
while true; do
- read -p "Du you want the Admin Package to be integrated and activated? (y/n)" yn
- case $yn in
- [Yy]* ) git submodule add git://github.com/mneuhaus/FLOW3-Admin.git Packages/Application/Admin
+ read -p "Du you want the Admin Package to be integrated and activated? (y/n)" yn
+ case $yn in
+ [Yy]* ) git submodule add git://github.com/mneuhaus/FLOW3-Admin.git Packages/Application/Admin
./flow3 package:activate Admin
+ mv Configuration/Routes.yaml Configuration/Routes_orig.yaml
+ cat > Configuration/Routes.yaml << EOF
+##
+# Admin package subroutes
+#
+
+-
+ name: 'Authentication Actions'
+ uriPattern: 'authentication(/{@action})'
+ appendExceedingArguments: true
+ defaults:
+ '@controller': 'Login'
+ '@action': 'index'
+
+-
+ name: 'Logout'
+ uriPattern: 'logout'
+ defaults:
+ '@action': 'logout'
+ '@package': 'Admin'
+ '@controller': 'Login'
+ '@format': 'html'
+
+-
+ name: 'Admin actions'
+ uriPattern: '{@action}'
+ defaults:
+ '@action': 'index'
+ '@controller': 'Standard'
+ '@format': 'html'
+
+-
+ name: 'Admin actions'
+ uriPattern: '{@action}/{being}'
+ appendExceedingArguments: true
+ defaults:
+ '@action': 'index'
+ '@controller': 'Standard'
+ '@format': 'html'
+
+EOF
+ cat Configuration/Routes_orig.yaml >> Configuration/Routes.yaml
+ rm -f Configuration/Routes_orig.yaml
echo
echo
echo "Do not forget to run ./flow3 doctrine:migrate and to flush the FLOW3 caches!"
echo
break;;
- [Nn]* ) echo "OK, no Admin Package for you - let's finish with the other stuff..."
+ [Nn]* ) echo "OK, no Admin Package for you - let's finish with the other stuff..."
echo
break;;
- * ) echo "Please answer yes or no.";;
- esac
+ * ) echo "Please answer yes or no.";;
+ esac
done
+# ask whether an own package shall be included
+echo
+echo
+echo "Now we're almost done, but we could add a package if you'd like...?"
+echo "Note: The package to be included needs to be available as a Git repo that we can add as a submodule."
+while true; do
+ read -p "Do you want to package an other package into this distribution? (y/n)" yn
+ case $yn in
+ [Yy]* ) read -p "Please enter the package Name including the VendorPrefix (e.g. \"Acme.Example\"): " packageName
+ read -p "Please enter the URL to the Git repository of this package: " packageRepoUrl
+ git submodule add ${packageRepoUrl} Packages/Application/${packageName}
+ ./flow3 package:activate ${packageName}
+ echo
+ echo
+ echo "Do not forget to run ./flow3 doctrine:migrate and to flush the FLOW3 caches!"
+ echo
+ break;;
+ [Nn]* ) echo "OK, no additional Package for you - let's finish with the other stuff..."
+ echo
+ break;;
+ * ) echo "Please answer yes or no.";;
+ esac
+done
+
+
+
+
+
# ignore certain files from being versioned by Git
touch .gitignore
View
9 ideas.rst
@@ -5,12 +5,11 @@ Instead of using the issues/ticket functionality of GitHub, I'd rather have a sh
Priority "Would love to have that in"
-------------------------------------
-- asking for the package name that should be packaged into this distribution (and it's git repo URL so it can be directly hooked in as a submodule)
-- asking for the Distribution name to build
+ asking for the package name that should be packaged into this distribution (and it's git repo URL so it can be directly hooked in as a submodule)
+ asking for the Distribution name to build
✔ asking whether the Admin-Package should be integrated and activated
-- instead of using the current folder script should as for the target directory
-- remove the routes for the welcome package from the routes.yaml file
-- adding the admin routes to routes.yaml if the Admin Package is included
+✔ remove the routes for the welcome package from the routes.yaml file
+✔ adding the admin routes to routes.yaml if the Admin Package is included

No commit comments for this range

Something went wrong with that request. Please try again.