diff --git a/README.md b/README.md index e792d33..3350abb 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ You'll setup a project which will need the following information: Projects will be defined in a project.json file for now. I may add a web interface later. +@dir in any of the script strings will be replaced with an absolute path to the current working directory of the specific version being worked on. +``` +sh ./build.sh @dir +``` + Ironsmith will take the information for the defined project above and do the following @@ -26,7 +31,8 @@ Ironsmith will take the information for the defined project above and do the fol 2. Change to that directory 2. Create a bolt DB file for the project to keep a log of all the builds 3. Run an initial pull of the repository using the pull script -4. If pull succeeds, Run the Build Scripts +4. Run version script +4. If pull is a new version, then Run the Build Scripts 5. If build succeeds, run the test scripts 6. If test succeeds, run the release scripts 7. Load the release file into project release folder with the release name diff --git a/build.sh b/build.sh index 3031e8a..cf9d1f7 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,9 @@ #!/bin/bash -git clone https://git.townsourced.com/tshannon/config.git ./workspace/src -go-bindata web/... && go build -a -v -o ironsmith -pkgdir ./workspace +dir=$1 + +export GOPATH=$dir + +go get -u https://git.townsourced.com/townsourced/ironsmith + +go-bindata web/... && go build -a -v -o ironsmith diff --git a/exec.go b/exec.go index b50865f..6399a6d 100644 --- a/exec.go +++ b/exec.go @@ -11,7 +11,7 @@ import ( ) func runCmd(cmd, dir string) ([]byte, error) { - s := strings.Fields(cmd) + s := strings.Fields(strings.Replace(cmd, "@dir", dir, -1)) var args []string