Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R release-cli
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • release-cli
  • Merge requests
  • !67

Read release description from file if present

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Nejc Habjan requested to merge nejc/release-cli:read-release-description-from-file into master Oct 29, 2020
  • Overview 105
  • Commits 18
  • Pipelines 18
  • Changes 12

Allows specifying a file inside the current working directory ($CI_PROJECT_DIR) to read for the release description, either via the release-cli tool or in .gitlab-ci.yml in the release:description: node.

Usage in .gitlab-ci.yml:

release:
  stage: release
  script: echo "Creating new release"
  release:
    tag: v1.0.0
    name: "Release v1.0.0"
    description: description.txt

Usage in CLI:

release-cli create --name "Release v1.0.0" --description "description.txt" --tag-name "v1.0.0" ...

This has the following behavior:

  • if the description contains spaces between words: it is treated as a string,
  • if the description is a single word and is a file or a symlink to a file inside $CI_PROJECT_DIR: the file's contents will be read as the release description,
  • if the description is a single word and is a file or a symlink to a file outside $CI_PROJECT_DIR, or if the target file does not exist: it is treated as a string.

Closes #14 (closed).

Edited Dec 15, 2020 by Jaime Martinez
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: read-release-description-from-file