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

packit, don't touch version, change release #748

Merged
merged 1 commit into from Mar 10, 2020

Conversation

TomasTomecek
Copy link
Member

@TomasTomecek TomasTomecek commented Mar 5, 2020

Example:

packit-0.8.1-1.20200305174322588258.104.g14f3e25.fc31.src.rpm

TODO:

  • get rid of the version stuff
  • doks - actually, there is not much to document here
  • fix tests
  • The template string for the release is not gonna be configurable.
  • test this with our biggest customers to make sure we're not breaking them (tried with packit, ogr, osbuild and tmt)

Fixes #693

Signed-off-by: Tomas Tomecek ttomecek@redhat.com

@softwarefactory-project-zuul

This comment has been minimized.

@packit-as-a-service
Copy link

packit-as-a-service bot commented Mar 5, 2020

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/packit-service-packit-748
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@jpopelka
Copy link
Member

jpopelka commented Mar 6, 2020

looks OK so far

@TomasTomecek TomasTomecek added the ready-for-review Pull request is ready for review. label Mar 6, 2020
@softwarefactory-project-zuul

This comment has been minimized.

Fixes packit#693

Read that issue for more info (and get a coffee).

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
@TomasTomecek TomasTomecek added the mergeit When set, zuul wil gate and merge the PR. label Mar 9, 2020
@softwarefactory-project-zuul
Copy link
Contributor

softwarefactory-project-zuul bot commented Mar 9, 2020

Build succeeded.

# git adds various info in the output separated by -
# so let's just drop version and reuse everything else
g_desc_raw = git_des_out.split("-", 1)[1]
Copy link
Member

@csomh csomh Mar 10, 2020

Choose a reason for hiding this comment

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

Will this work for all projects? Are tags always versions only? The reason for asking is b/c in git.centos.org, I see tags like imports/c8/rpm-4.14.2-25.el8, which also contain a version, but they will fail to be processed this way.

Copy link
Member Author

@TomasTomecek TomasTomecek Mar 10, 2020

Choose a reason for hiding this comment

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

that's git-describe specific, it uses dashes to separate different data - sadly one cannot format it

yeah, we may need to polish this for centos stream - or figure out how to operate with release and version - we will be in control of the repos, so we may use more sensible tags

Copy link
Member Author

@TomasTomecek TomasTomecek Mar 10, 2020

Choose a reason for hiding this comment

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

what I wrote is bullshit, I thought we're talking about something else - in your case, curse all the people who use dashes in tags

self._fix_spec_source(archive)
self._fix_spec_prep(version)

msg = f"- Development snapshot ({commit})"
self.specfile.set_spec_version(version=f"{version}", changelog_entry=msg)
release = template.format(
Copy link
Member

@csomh csomh Mar 10, 2020

Choose a reason for hiding this comment

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

Would using a format-string and dropping template make things easier to read?

Copy link
Member Author

@TomasTomecek TomasTomecek Mar 10, 2020

Choose a reason for hiding this comment

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

uuhhhhhhhhhhhhhhhh

Copy link
Member

@jpopelka jpopelka left a comment

LGTM, just would be nicer if you could define variables (original_release_number, current_time, template, msg) closer to where they are used.

@softwarefactory-project-zuul
Copy link
Contributor

softwarefactory-project-zuul bot commented Mar 10, 2020

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 818f05a into packit:master Mar 10, 2020
10 checks passed
@TomasTomecek
Copy link
Member Author

TomasTomecek commented Mar 10, 2020

#759 flwup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR. ready-for-review Pull request is ready for review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version generation for PRs does not guarantee increasing values
3 participants