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

Add portversion property to builds #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mojca
Copy link
Member

@mojca mojca commented Jul 12, 2021

This is a prerequisite for macports/macports-webapp#135

The first commit has been tested under buildbot 2.x a while ago, I haven't tested it under 0.8 yet.
The second commit is a pure speculation that tries to use the port command with the correct prefix.

See: https://trac.macports.org/ticket/56028

@mojca mojca requested review from ryandesign and jmroot July 12, 2021 15:26
@@ -590,6 +590,10 @@ portbuilder_factory.useProgress = False
portbuilder_factory.workdir = '../build'
logdir = os.path.join(portbuilder_factory.workdir, 'logs')

portbuilder_factory.addStep(steps.SetPropertyFromCommand(
command=['port', 'info', '--version', '--line', util.Interpolate('%(prop:portname)s')],
Copy link
Member Author

@mojca mojca Jul 12, 2021

Choose a reason for hiding this comment

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

This potentially doesn't use the correct prefix for port. Maybe it should have been something in the spirit of

util.WithProperties(prefix) + '/bin/port'

instead, but I have no clue how to make that work.

Alternatively I could modify mpbb and print the version next to build statistics, but this approach with setting the property sounds much cleaner to me.

We could use something similar to macports/mpbb@11548bc with a standalone mpbb command to extract the version. I know how to do that, but it sounds like a bit of an overkill.

@mojca
Copy link
Member Author

mojca commented Jul 21, 2021

@ryandesign: did you have any chance testing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant