Search code examples
githubtravis-cicontinuous-deploymentgithub-release

Problem with creating github release via travis-ci with body content


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!


Solution

  • 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