Skip to content

Conversation

@dikhan
Copy link
Owner

@dikhan dikhan commented Apr 18, 2022

What problem does this Pull Request solve?

This PR fixes the release pipeline currently blocked due to the github-release-notes lib being added as a go mod dep and therefore causing the git state to become dirty before goreleaser is able to execute the release which makes it fail.

Example of release failing due to the above: https://app.travis-ci.com/github/dikhan/terraform-provider-openapi/jobs/567413504

18.55s$ make release-version
[INFO] No github-release-notes in /home/travis/gopath/bin:/home/travis/.gimme/versions/go1.16.15.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.9.1/bin:/home/travis/.kiex/elixirs/elixir-1.4.5/bin:/home/travis/.kiex/bin:/home/travis/.rvm/gems/ruby-2.4.1/bin:/home/travis/.rvm/gems/ruby-2.4.1@global/bin:/home/travis/.rvm/rubies/ruby-2.4.1/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.7.4.linux.amd64/bin:/usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin, installing github-release-notes
go get github.com/buchanae/[email protected]
go: downloading github.com/buchanae/github-release-notes v0.0.0-20180827045457-200e1dacadbb
go: downloading github.com/google/go-github v17.0.0+incompatible
go: downloading golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
go: downloading golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3
go: downloading google.golang.org/appengine v1.6.6
go: downloading github.com/google/go-querystring v1.0.0
go: downloading github.com/golang/protobuf v1.4.2
go: downloading google.golang.org/protobuf v1.25.0
Attempting to release new version v3.0.0; current release v2.2.0
[INFO] New version v3.0.0 valid for release
[INFO] Creating a new tag v3.0.0
[INFO] Releasing v3.0.0
   • releasing...     
   • loading config file       file=.goreleaser.yml
   • loading environment variables
   • getting and validating git state
      • building...               commit=fdba646e24d0ac073f1aac657fe725c33ee37633 latest tag=v3.0.0
      • running against a shallow clone - check your CI documentation at https://goreleaser.com/ci
   ⨯ release failed after 0.03s error=git is currently in a dirty state
Please check in your pipeline what can be changing the following files:
 M go.mod
 M go.sum

Type of change

What type of change does your code introduce to the provider? Please put an x (w/o heading/trailing white spaces) in the boxes that apply:

  • New feature (change that adds new functionality)
  • Bug-fix (change that fixes current functionality)
  • Tech debt (enhances the current functionality)
  • New release (pumps the version)

Checklist

Please put an x (w/o heading/trailing white spaces) in the boxes that apply:

  • I have read and followed the CONTRIBUTING guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have made sure code compiles correctly and all tests are passing by running make test-all
  • I have added/updated necessary documentation (if appropriate)
  • I have added the following info to the title of the PR (pick the appropriate option for the type of change). This is important because the release notes will include this information.
    • Feature Request: PRs related to feature requests should have in the title [FeatureRequest: Issue #X] <PR Title>
    • Bug Fixes: PRs related to bug fixes should have in the title [BugFix: Issue #X] <PR Title>
    • Tech Debt: PRs related to technical debt should have in the title [TechDebt: Issue #X] <PR Title>
    • New Release: PRs related to a new release should have in the title [NewRelease] vX.Y.Z

Checklist for Admins

  • Label is populated
  • PR is assigned to the corresponding project
  • PR has at least 1 reviewer and 1 assignee

@dikhan dikhan self-assigned this Apr 18, 2022
@dikhan dikhan added the bug-fix label Apr 18, 2022
@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #341 (eeb06cc) into master (fdba646) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #341   +/-   ##
=======================================
  Coverage   93.66%   93.66%           
=======================================
  Files          60       60           
  Lines        3584     3584           
=======================================
  Hits         3357     3357           
  Misses        160      160           
  Partials       67       67           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdba646...eeb06cc. Read the comment docs.

@dikhan dikhan changed the title Only install the binary and not add it to the mod deps Fix release pipeline: Only install the binary and not add it to the mod deps Apr 18, 2022
@dikhan dikhan merged commit eca9bbd into master Apr 18, 2022
@dikhan dikhan deleted the dont-get-github-release-notes-as-mod-dep branch April 18, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants