Updated build and wercker, again

This commit is contained in:
Torkel Ödegaard 2015-03-03 18:11:16 +01:00
parent f2595917c6
commit 8054f6a2d1
2 changed files with 10 additions and 12 deletions

View File

@ -67,6 +67,7 @@ func main() {
case "build": case "build":
pkg := "." pkg := "."
var tags []string var tags []string
clean()
build(pkg, tags) build(pkg, tags)
case "test": case "test":
@ -76,11 +77,7 @@ func main() {
version += "-" + getGitSha() version += "-" + getGitSha()
case "package": case "package":
clean()
//verifyGitRepoIsClean() //verifyGitRepoIsClean()
test("./pkg/...")
build(".", []string{})
buildFrontend()
createRpmAndDeb() createRpmAndDeb()
case "build-ui": case "build-ui":

View File

@ -12,26 +12,27 @@ build:
name: build setup name: build setup
code: | code: |
go run build.go setup go run build.go setup
sudo apt-get install -y ruby-dev gcc
sudo gem install fpm sudo gem install fpm
# Build the project # Build the project
- script: - script:
name: build backend name: build
code: | code: |
go run build.go build go run build.go clean test build
# Test the project
- script:
name: test backend
code: |
go run build.go test
# frontend # frontend
- npm-install - npm-install
- grunt: - grunt:
tasks: release tasks: release
# create packages
- script:
name: create packages
code: |
go run build.go package
# save packages
- script: - script:
name: copy output name: copy output
code: |- code: |-
rsync -rv "$WERCKER_SOURCE_DIR/dist/" "$WERCKER_OUTPUT_DIR" rsync -rv "$WERCKER_SOURCE_DIR/dist/" "$WERCKER_OUTPUT_DIR"
deploy: deploy:
steps: steps:
- add-to-known_hosts: - add-to-known_hosts: