Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"release: false" in Source configuration doesn't have any effect #95

Closed
arutsudar opened this issue Mar 16, 2020 · 1 comment · Fixed by #100
Closed

"release: false" in Source configuration doesn't have any effect #95

arutsudar opened this issue Mar 16, 2020 · 1 comment · Fixed by #100

Comments

@arutsudar
Copy link

In Readme, it says,

release: Optional. Default true. When set to true, put produces release and check detects releases. If false, put and check will ignore releases. Note that releases must have semver compliant tags to be detected.

When trying this below concourse deployment yaml,

---
resources:
- name: git-REPOSITORY_NAME-version
  type: git
  source:
    uri: git@github.com:OWNER_NAME/REPOSITORY_NAME.git
    branch: Version
    private_key: {{rsa-key}}

- name: res-github-release-REPOSITORY_NAME
  type: github-release
  source:
    owner: OWNER_NAME
    repository: REPOSITORY_NAME
    release: false
    access_token: ACCESS_TOKEN

jobs:
- name: Create Tag
  plan:
  - get: git-REPOSITORY_NAME-version
  - put: res-github-release-REPOSITORY_NAME
    params:
      name: git-REPOSITORY_NAME-version/version1/version1.txt
      tag: git-REPOSITORY_NAME-version/version1/version1.txt

I was expecting only the tag to be created.
(Note "release: false" in the github-release resource.)

But it creates both tag and a release, even though release is set as false. Or, am I not understanding the explanation correctly?

@arutsudar arutsudar changed the title release: false in Source configuration doesn't have any effect "release: false" in Source configuration doesn't have any effect Mar 16, 2020
@aoldershaw
Copy link
Contributor

The behaviour for this is a bit odd for put, and the documentation could definitely use some clarification. I think the confusion is in the terminology used: release in the source config actually refers to "final" releases (i.e. not pre-releases). So, setting release: false makes it so that:

  1. Checks don't emit versions for final releases (but still generate versions for pre-releases if pre_release: true)
  2. Puts will create pre-releases if pre_release: true (otherwise, release: false has no effect)

I'll update the README to clarify this.

aoldershaw added a commit that referenced this issue Jun 29, 2020
#95

Signed-off-by: Aidan Oldershaw <aoldershaw@pivotal.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants