# This is a sample build configuration for Docker.
# Check our guides at https://confluence.atlassian.com/x/O1toN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: hbpneurorobotics/nrp:dev

pipelines:
  branches:
    development:
    - step:
        name: Build
        script: # Modify the commands below to build your repository.
          - npm install -g bower
          - rm -rf build/
          - rm -rf gzbridge/build
          #- mkdir client
          #- sudo rm -rf http/client && ln -s client http/client  # some permission issue
          - sudo chown -R bbpnrsoa:bbp-ext $BITBUCKET_CLONE_DIR/http

          - ./deploy-gzbridge-nrp.sh
          # Dedupe helps prevents known issue "npm ERR! enoent ENOENT: no such file or directory, rename"
          # For more information see: https://github.com/zurb/foundation-sites/issues/10826
          - npm dedupe
          - npm install --no-save
          - cd gz3d/utils
          - npm dedupe
          - npm install --no-save