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

FIX replace 20.04->22.04 in repo URLs #5

Conversation

ukablan-wpc
Copy link
Contributor

Use regular expressions (actions.ReplaceAptReposRegexp) to do it.

@ukablan-wpc ukablan-wpc force-pushed the ukablan_fix__c2alma_fail_since_version_in_repo_url__PAUX-6369 branch from 7c1f301 to 8f76f58 Compare October 1, 2024 09:51
@@ -112,6 +112,10 @@ def construct_actions(
# we support following PHP versions: PHP 7.1, 7.2, 7.3.
actions.UpdateLegacyPhpRepositories(self._distro_from, self._distro_to),
actions.SetupUbuntuRepositories("focal", "jammy"),
actions.ReplaceAptReposRegexp(
r'(http|https)://([^/]+)/(.*\b)20\.04(\b.*)',
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks scary 😆
But ok, let's try this approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For me replacing strings naively is more scary :)
I expect, at most no-op (transform the string as is) when it could harm.

@ukablan-wpc ukablan-wpc merged commit 9439c45 into main Oct 2, 2024
1 check passed
@ukablan-wpc ukablan-wpc deleted the ukablan_fix__c2alma_fail_since_version_in_repo_url__PAUX-6369 branch October 2, 2024 07:18
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