-
Notifications
You must be signed in to change notification settings - Fork 9
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
Questions on the mutliverse of versions #109
Comments
Hey! 👋
Sure, for example the gitport could do something like this: diff --git a/buildenv b/buildenv
index ebfc813..ab5dc91 100644
--- a/buildenv
+++ b/buildenv
@@ -3,6 +3,7 @@
#
export ZOPEN_TYPE="TARBALL"
+# bump: git /GIT_VERSION="(.*)"/ https://github.com/git/git.git|*
GIT_VERSION="2.41.0"
export ZOPEN_GIT_URL="https://github.com/git/git" Here "git" is the name of the thing tracked, Add a new file There are some instructions in the README.md how to setup github action https://github.com/wader/bump#github-action Will be out on bike vacation the next week (but will bring laptop :)) so might be a bit slow to answer. |
Thank you, I'll give it a go. |
👍 let me know how it goes! looking at the project it should be a good fit i think |
Hey, it's actually for the whole lot under https://github.com/ZOSOpenTools. EDIT: How would I look for https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz for example. |
Ok no worries! just ask if you have any questions. Nicest is usually do use a source repo as source of versions, ex in this case you could use: # bump pipeline is a command to run pipelines, add -v if you want to see more verbose output
$ bump pipeline 'https://git.savannah.gnu.org/git/autoconf.git|*'
2.71 Note that from time to time developers tag versions very early which might trigger bump to find a versions that has not been released yet. But it's quiet rare. If that was not the case in these was only list listing i guess you would have to use "fetch" and then some regexp magic to match for versions which is not nice... but works. So advice is try use git, svn, depsdev etc as versions source. |
@wader, editing this comment to say it works 👍 |
Hey, how would I look up v3r17 from git tags for example? |
👍 great, saw in notification email :) problem with the regex and the "v"? was the error message confusing or something that could be improved to make it clearer? |
Interesting, so v3r17 could be seen as 3.17? something like this: $ bump pipeline 'gitrefs:https://github.com/zigi/zigi.git|re:/v(\d+)r(\d+)/$1.$2/|*'
3.17 This uses |
btw if you just want to try things there is a "static" source so you can do: $ bump pipeline 'static:v3r17,v2r23|/v(.*)r(.*)/$1.$2/'
3.17 |
User error 😛 I put quotes in the bump text when the line of interest didn't have any.
|
Hey, I wonder... do you think there's value in there being a bumperbot? |
Benefit would be that it could run for a whole organisation or user etc without much setup? i haven't looked into how github apps work (i think that is what dependabot is?) so no idea how much work it would be. I guess one "problem" would be that is has to run somewhere if i understand how i works? looks like it's hooks and API:s compare to github action which runs code? maybe one can mix somehow? |
Yup..
Probably..
Earlier today, I saw that Dependabot can be setup to trigger GitHub Actions, so there's a place for both. |
I see, hmm will think about it. Would guess it's quite a bit of work |
Is it ok that I ask about edge cases here, I've got 100+ repos to go through 😅 This gets 1.9.13, but the optional p trips the final semver:
And sqlite. https://sqlite.org/2023/sqlite-autoconf-3420000.tar.gz from https://sqlite.org/download.html Why can't everyone use one standard lol. |
No worries :) i just can't promise anything. I wonder if in your case you could do some custom with a shell script that runs with a token with lots of access and then use github cli command to iterate all repos and run bump somehow?
Yeah that is problem, semver is quite strict and sadly "extra" thing after the version is seen as pre release so i sorted that way :( I wonder in this case if some kind of natural or "version" sort filter would be needed?
i guess bump kind of exist partly because it is a mess 😬 Something like this? $ bump pipeline 'gitrefs:https://github.com/sqlite/sqlite.git|/version-(.*)/$1/|*'
3.42.0 But maybe does not match version in download URL? I've had some ideas that "next-generation" bump if ever happens should probably use some more expressive pipeline language like jq. |
Absolutely, I'm hoping the edge cases will help find some ideas for tackling more things in the next-gen bump.
I have the following in mind: Collect all patches and send it over, because I don't have rights on most of the repos.
https://github.com/linux-on-ibm-z/dockerfile-examples Background: I'm a mainframer. There are 2 predominant mainframe OS-es.
Yup. I made a silly error in the regex for picking the 'current version' in the Bumpfile. sqliteport/buildenv:3: sqlite-year 2023 -> 2023 2.854s
sqliteport/buildenv:4: sqlite-version 3420000 -> 342000 2.780s |
👍
Yeap something like that might be good workaround for now, might be some work but probably nice to have it in one place at least. BTW you can put bump config in any file if you don't want to have a Bumpfile, then just do
What should i be looking at? 👀 looked for bump config but found none :) Yeap bump have saved me tons of time and also saved time when you find incompatibilities fast.
I see, so professional mainframer? maybe that is the only kind? :)
Will try add something, thinking maybe the
Been there :) |
Haha, at the possibility... of bump giving back the maintainer's time 😁
Actually yeah; the only available personal emulated version of zOS costs ~$5k/yr.
When working out openssl yesterday, for 1.x.x(char), this picks up the trailing char too. Doesn't work for sudo 1.9.13p3 (which has number after the char 'p'). For feature requests - having a |
Aha :)
Did you managed to get bump to sort those versions in a usable way? btw the the last char optional maybe?
How does the workaround work? 😄 Currently my idea for version sort is to split strings into array of strings and numbers and then sort by compare each part and if common "prefix" is equal prefer longer array. So "1.9.13p3" => [1,".",9,".",13,"p",3] compared to "1.9.13" => [1,".",9,".",13] then "1.9.13p3" would be considered first. That is opposite of how semver works. But think i will have to read up a bit about how other version sorts work and also try a bit. Let me know if you want to try it out.
So something like: $ bump version-history fancy-pants-tool
1.3
1.2
1.1
... Could probably be done, might have to change so that some filters don't remove versions (unless they are actual filters). I think semver currently picks out one version atm, then it would instead only filter out newer ones that don't fit the constraint? I think you kind of can see something similar to this already with |
Yeah, the pipeline I shared works. Don't know about the optional char part... it has had it for a while now.
I'm using this for getting 1.9.13. Then 'p3' is hard-coded lol. On version sort, yeah sure, can try it out. Yeah the versions it picks shows up in pipeline -v, but it's too verbose as you say; mainly because of the HTML page print. |
Have a look at #112 if you have golang installed you can run it like this: $ go run github.com/wader/bump/cmd/bump@version-sort pipeline 'gitrefs:https://github.com/sudo-project/sudo.git|/SUDO_(.*)/$1/|sort:version'
1_9_13p3 Still a rough draft but seems to work quite well
Ah yeah that output is not very nice, maybe i can fix that a bit also. How about just |
Yup, sounds good. |
Hey, I've bumped almost all projects under ZOSOpenTools - https://github.com/orgs/ZOSOpenTools/discussions/285#discussioncomment-6269657 Only thing that stands out is sudo - $ go run github.com/wader/bump/cmd/bump@version-sort pipeline 'gitrefs:https://github.com/sudo-project/sudo.git|/SUDO_(.*)/$1/|sort:version'
go: downloading github.com/wader/bump v0.0.0-20230616184622-ca00c9027be7
1_9_14 The one that installs with $ bump pipeline 'gitrefs:https://github.com/sudo-project/sudo.git|/SUDO_(.*)/$1/|sort'
1_9_9
$ bump pipeline 'gitrefs:https://github.com/sudo-project/sudo.git|/SUDO_(.*)/$1/|sort:version'
arg should be empty |
Impressive! how long does it take to run? Yes @latest will end up building the master branch where the sort filter is probably not happy about getting an argument "version". Haven't had much time looking into what to do about more flexible/configureable version sort. Any ideas how it could look like? Nice trick with
Should it be |
Think about 5s. Some of it I'm sure is down to some quirky domains.
Whoops, yup.
Was looking through the sudo.ws site and this page is pretty neat - $ bump pipeline -v 'https://www.sudo.ws/getting/source/|re:/sudo-([\d.]+p?\d?).tar.gz"/$1/
@ name -> name
re:/sudo-([\d.]+p?\d?).tar.gz"/$1/:
1.9.14
1.9.13p3
1.9.13p2
Whereas this page trips on it, and shows |
👍 bump will currently do all pipelines in parallell so given enough bandwidth it should more or less take as long as the slowest
Aha you rely on the order in the page, that works. I have some vague idea that the sort filter could be told how to sort per "column", made up example: |
No worries, I'm happy that bump even exists and has got us to the other side. |
Yeap let's keep the issue open and see Happy to hear it's being useful! 🥳 |
Hey @wader, reporting back to say all good. |
@v1gnesh Nice to hear! 👍 would be nice to have a peek at the setup once it's up! and as always just give me a shout if there is anything |
@wader It sez https://github.com/ZOSOpenTools/duckdbport/actions/runs/6199894436/job/16833401842 |
Yeap will have look when i have time. But the link gives me 404 not found hmm |
Ah sorry, it'll be in https://github.com/ZOSOpenTools/duckdbport/actions. |
Try add But i have feeling i might have messed up in 7e39445 when i renamed "bump_files" to "files, in the commit message it says |
Woohoo, it works! It needs |
🥳
I had to use a PAT-token to do this i think? but maybe things has changed? there is some notes about it at https://github.com/wader/bump#github-action
You mean something like https://github.com/owenthereal/action-upterm but i haven't used it myself Or did you mean something bump-related don't run on s390x? |
Your notes saved me hours of reading for sure 😛 An extension of sorts that will let Actions do stuff to an SSH target... if one exists... will be great. |
👍
Aha you want to ssh out from the runner, thought you wanted to debug on the runner :) i guess you should be abele to "just" ssh somewhere? but i maybe biggest mess i handling of keys etc? |
Yeah.. keys, getting command outputs back, reporting that back to GH, etc. |
You mean implement a "self-hosted runners" thingy? yeah that would nice i guess |
Yup |
Hello, our paths cross again :)
I'm pretty new to this proj (only saw it yesterday), and as I try to understand it... it will be super helpful if you can show some examples of how to use this to keep references to tarball sources updated.
My use case is to keep ports up-to-date at https://github.com/ZOSOpenTools/.
Git covers a fair chunk of sources, but there are GNU sources and such, where we need to fetch from tar.gz and so on.
Example: https://github.com/ZOSOpenTools/gitport/blob/main/buildenv or https://github.com/ZOSOpenTools/opensshport/blob/main/buildenv
Any guidance will be of huge help, as I'm sure the tool will be.
✌️
The text was updated successfully, but these errors were encountered: