0

I need help or explanation in deployment to github releases via Travis-CI

I have part of .travis.yml configuration file

jobs:
  include:
    - stage: publish
      if: env(BRANCH_IS_TAG) != true
      name: "Create Github Release"
      script:
        - yarn build
        - bash ./prepare-publish.sh
      deploy:
        provider: releases
        name: "Release ${PACKAGE_VERSION}"
        body: "test \n test \r\n + /r/n *"
        overwrite: true
        skip_cleanup: true
        api_key:
          secure: ${GITHUB_TOKEN}
        file:
          - release.zip
        on:
          all_branches: true
          repo: acacode/stonex

This part of config works fine while I'm not changing this line

  body: "test \n test \r\n + /r/n *"

To

  body: "${GIT_LOG}"

This variable is creating before deploy part in prepare-publish.sh script

export GIT_LOG=$(git cherry -v develop)

And output it:

enter image description here

When I attach this variable to body Travis says me

   invalid option "--body="

travis configuration file: https://raw.githubusercontent.com/acacode/stonex/internal/travis-ci-builds/.travis.yml

travis build log with this problem: https://travis-ci.org/acacode/stonex/builds/524606655#L543

script which contain the $GIT_LOG variable: https://github.com/acacode/stonex/blob/internal/travis-ci-builds/prepare-publish.sh

Hope on your help, thanks!

Sergey Volkov
  • 871
  • 11
  • 17

1 Answers1

1

Seems like passing the body option is an existing bug in travis-ci deploys that hasn't been fixed yet: https://github.com/travis-ci/dpl/issues/155

StephenG
  • 2,851
  • 1
  • 16
  • 36
  • Yes, you are right! But also my config have a couple additional problems like creating environment variables inside child bash scripts and use them inside travis config. If someone will want to do the same things like publishing on github releases via Travis. Better to use custom scripts on nodejs or ruby – Sergey Volkov May 03 '19 at 16:14