- Notifications
You must be signed in to change notification settings - Fork927
chore: fix up migration number fixer#14266
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Signed-off-by: Danny Kopping <danny@coder.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We could consider importinglib.sh
and verify Bash that way. This is not the only script that requires a more modern Bash I believe.
I'm a bit conflicted re:git mv
, I agree it's not elegant but the file being renamed is not guaranteed to be staged, wouldn't that cause issues?
Cool, I'm not particularly for out against so feel free to PR that work if you want to. Might be best to have a script or make target to shoot having to "go run".
We don't pull, just fetch. The fetch has a purpose in that it allows checking the remote, not just your local files. For me that was a big reason to write the script, when I had conflicts I could just run the script and enjoy the magic.
Why dumb it down? When I had conflicts I didn't really want to figure out what I need to do, just wanted the problem solved 😂 |
Hhmm interesting idea. You thinking of using
Oof, good point.
Fair point! I misspoke. I think let's keep this script instead of the Go one (that took me like 10m with ChatGPT, Mr Snippet himself, doing most of the work 😄). Let's keep the |
Signed-off-by: Danny Kopping <danny@coder.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Or just the latter?
Just the latter 👍.
c90e6d7
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Fixes:
usesgit mv
which is more idiomatic for renamesThis script still relies on folks needing a version of Bash not shipped with MacOS by default.
I'm using this version, so it works, but it doesn't work natively for folks running the default.
$ which bash/opt/homebrew/bin/bash$ bash --versionGNU bash, version 5.2.26(1)-release (aarch64-apple-darwin23.2.0)# Default version$ /bin/bash --versionGNU bash, version 3.2.57(1)-release (arm64-apple-darwin23)
I created a Go equivalent inhttps://github.com/coder/coder/compare/dk/fix-migs which we could consider moving to.
It's a bit simpler (doesn't pull the given branch - trying to be more UNIXy), and requires a regex to match a file needing a rename, so it's more dumb but more explicit.