Permalink
Browse files

Updated templates install to reflect api/templates changes, also remo…

…ved templates seed.
  • Loading branch information...
1 parent c984230 commit f33f2a9f3e1f8dfa27650d73068b3c16e37d5d79 @wayneeseguin wayneeseguin committed Apr 3, 2012
Showing with 17 additions and 32 deletions.
  1. +12 −7 bin/templates/install
  2. +0 −24 bin/templates/seed
  3. +5 −1 templates/README.template
View
@@ -13,14 +13,12 @@ set -v # Turn on verbose logging, so that the following will present a tutorial.
# Ownership types are mode, owner, group
# Note: namespace is required to use templates such as 'apidoc/README'
-
# Install the template README with no variables passed in
templates install "apidoc/README" to /tmp/README
# View template created
cat /tmp/README
-
# Install the template README and set app name
templates install "apidoc/README" to /tmp/README \
app_name "Test App name"
@@ -29,16 +27,22 @@ templates install "apidoc/README" to /tmp/README \
cat /tmp/README
# Install the template README and set ownership
-templates install "apidoc/README" to /tmp/README \
- mode 0776 owner "${user}"
+templates install "apidoc/README" \
+ to "/tmp/README" \
+ mode 0776 \
+ owner "${user}"
# View ownership
ls -lh /tmp/README
# Install the template README and set app name and variable
-templates install "apidoc/README" to /tmp/README \
- mode 0666 owner "${user}" \
- app_name "Test App name"
+templates install "apidoc/README" \
+ to /tmp/README \
+ mode 0666 \
+ owner "${user}" \
+ variables \
+ application_name "test-application" \
+ environment_name "production"
# View ownership
ls -lh /tmp/README
@@ -48,3 +52,4 @@ cat /tmp/README
# Clean up
file remove /tmp/README
+
View
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -v # Turn on verbose logging, so that the following will present a tutorial.
-
-# templates module api is loaded with the line 'api/templates' in the shell/includes.
-
-# Templates seed is used to set variables after template has been created
-
-# Setup initial template
-
-templates install 'apidoc/README' to /tmp/README
-
-# View initial template created
-cat /tmp/README
-
-# Set variable with templates seed
-templates seed /tmp/README \
- app_name "My template seed"
-
-# View changes after seed
-cat /tmp/README
-
-# Clean up
-file remove /tmp/README
@@ -1,3 +1,7 @@
# This is an example template README file
-export app_name="{{app_name}}"
+application="{{application_name}}"
+environment="{{environment_name}}"
+
+export application environment
+

0 comments on commit f33f2a9

Please sign in to comment.