<commit_before>box: pei0804/gae-go-deploy
build:
  after-steps:
      - slack-notifier:
          url: $SLACK_WEBHOOK_URL
          channel: notification
          username: github
  steps:
  - script:
      name: バックエンドソースの場所を保存する
      code: |-
        : ${SRC:="./server"}
  - setup-go-workspace
  - script:
      name: GOROOTのパッケージに一般ユーザーからの書き込みの許可
      code: |
        sudo chmod -R a+w `goapp env GOROOT`/pkg
  - script:
      name: versionをチェックする
      code: |
        goapp version
        go version
  - script:
      name: depで依存パッケージをインストールする
      code: |
        GOROOT=/usr/local/go go get -u github.com/golang/dep/...
        /usr/local/go_appengine/gopath/bin/dep ensure
        /usr/local/go_appengine/gopath/bin/dep status
  - script:
      name: goagenでコード生成する
      code: |
        (cd vendor/github.com/goadesign/goa/goagen && GOROOT=/usr/local/go go get && GOROOT=/usr/local/go go build)
        ./vendor/github.com/goadesign/goa/goagen/goagen version
        export repo="${PWD#`goapp env GOPATH`/src/}"
        ./vendor/github.com/goadesign/goa/goagen/goagen app -d ${repo}/design
        ./vendor/github.com/goadesign/goa/goagen/goagen client -d ${repo}/design
        ./vendor/github.com/goadesign/goa/goagen/goagen swagger -d ${repo}/design -o server
  - script:
      name: GOPATHを設定する
      code: |
        export GOPATH="$GOPATH:$WERCKER_SOURCE_DIR"
        goapp env GOPATH
  - script:
      name: lint
      code: |
        GOROOT=/usr/local/go go get -u github.com/alecthomas/gometalinter
        /usr/local/go_appengine/gopath/bin/gometalinter --install --update --force
        /usr/local/go_appengine/gopath/bin/gometalinter ./... --config=lint_config.json
  - script:
      name: フロントエンドのinstall build
      cwd: ./front
      code: |
        npm install
        npm run build
  - script:
      name: goapp build
      code: |
        goapp build ${SRC}
  - script:
      name: goapp test
      code: |
        goapp test ${SRC}
  - script:
      name: サーバーサイドのコードを$WERCKER_OUTPUT_DIRへ
      code: |-
        rsync -avz ${GOPATH%%:*}/ $WERCKER_OUTPUT_DIR
deploy:
  steps:
  - script:
    name: deploy info
    code: find .
  - michilu/go-appengine-deploy:
    token: $APP_ENGINE_TOKEN
<commit_msg>add: werckerのbuildフェーズでdev.yamlを置くようにした<commit_after>box: pei0804/gae-go-deploy
build:
  after-steps:
      - slack-notifier:
          url: $SLACK_WEBHOOK_URL
          channel: notification
          username: github
  steps:
  - script:
      name: バックエンドソースの場所を保存する
      code: |-
        : ${SRC:="./server"}
  - setup-go-workspace
  - script:
      name: GOROOTのパッケージに一般ユーザーからの書き込みの許可
      code: |
        sudo chmod -R a+w `goapp env GOROOT`/pkg
  - script:
      name: versionをチェックする
      code: |
        goapp version
        go version
  - script:
      name: depで依存パッケージをインストールする
      code: |
        GOROOT=/usr/local/go go get -u github.com/golang/dep/...
        /usr/local/go_appengine/gopath/bin/dep ensure
        /usr/local/go_appengine/gopath/bin/dep status
  - script:
      name: goagenでコード生成する
      code: |
        (cd vendor/github.com/goadesign/goa/goagen && GOROOT=/usr/local/go go get && GOROOT=/usr/local/go go build)
        ./vendor/github.com/goadesign/goa/goagen/goagen version
        export repo="${PWD#`goapp env GOPATH`/src/}"
        ./vendor/github.com/goadesign/goa/goagen/goagen app -d ${repo}/design
        ./vendor/github.com/goadesign/goa/goagen/goagen client -d ${repo}/design
        ./vendor/github.com/goadesign/goa/goagen/goagen swagger -d ${repo}/design -o server
  - script:
      name: GOPATHを設定する
      code: |
        export GOPATH="$GOPATH:$WERCKER_SOURCE_DIR"
        goapp env GOPATH
  - script:
      name: lint
      code: |
        GOROOT=/usr/local/go go get -u github.com/alecthomas/gometalinter
        /usr/local/go_appengine/gopath/bin/gometalinter --install --update --force
        /usr/local/go_appengine/gopath/bin/gometalinter ./... --config=lint_config.json
  - script:
      name: フロントエンドのinstall build
      cwd: ./front
      code: |
        npm install
        npm run build
  - script:
      name: dev.yamlを本番用のものを設定する
      code: |
        cp -f ${SRC}/dev.yaml.tmpl ${SRC}/dev.yaml
  - script:
      name: goapp build
      code: |
        goapp build ${SRC}
  - script:
      name: goapp test
      code: |
        goapp test ${SRC}
  - script:
      name: サーバーサイドのコードを$WERCKER_OUTPUT_DIRへ
      code: |-
        rsync -avz ${GOPATH%%:*}/ $WERCKER_OUTPUT_DIR
deploy:
  steps:
  - script:
    name: deploy info
    code: find .
  - michilu/go-appengine-deploy:
    token: $APP_ENGINE_TOKEN

{'fraction_non_alphanumeric': 0.12158054711246201, 'fraction_numerical': 0.0017368649587494573, 'mean_word_length': 2.05706702057067, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4955919', 'n_tokens_mistral': 1831, 'n_tokens_neox': 1776, 'n_words': 315}