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

Tool 1347 log new step version info #692

Merged
merged 25 commits into from
Jan 21, 2020

Conversation

lszucs
Copy link
Contributor

@lszucs lszucs commented Jan 21, 2020

  • isUpdateAvailable was moved to a separate file and heavily refactored, because of the new requirements
  • update info printing got refactored in a separate function
  • monkey patched SetInfoModel in vendor to make CI pass, until dependency is updated

@lszucs lszucs requested a review from trapacska January 21, 2020 12:37
bitrise/print.go Outdated
content = updateRow
if stepInfo.Step.SourceCodeURL != nil && *stepInfo.Step.SourceCodeURL != "" {
content += "\n" + getRow("")
releasesURL := *stepInfo.Step.SourceCodeURL + "/releases"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • bitbucket urls may has no /releases ending
  • not sure why but I found occurrence or source code url not specified in the step.yml. is it more safe to get the source -> git field?

@trapacska trapacska merged commit c6b01ea into develop Jan 21, 2020
@trapacska trapacska deleted the TOOL-1347-log-new-step-version-info branch January 21, 2020 13:49
trapacska added a commit that referenced this pull request Jan 21, 2020
* refactor: extract function

* print resolved version when applicable

* refactor: simplify conditionals

* refactor: simplify conditional

* test cases: version row for major and minor lock

* build correct version info row string

* refactor: remove useless code

* print dotted changelog URL

* refactor: put major and minor test case together

* test case: url cropping

* empty line in box under version info

* dont show update info if latest version fits
lock

* remove development related temp code

* remove unrelated logic from tests

* improve test case name

* refactor: simplify string production

* test case for 1.x and 1.x.x format

* refactor: extract update handling to separate file

* refactor: consolidate update check flow

* handle semver parse error

* remove testing code

* refactor: make naming consistent

* monkey patch dependency

* fallback to repo url when releases url is unknown

* dep update

Co-authored-by: lszucs <[email protected]>
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 this pull request may close these issues.

2 participants