-
Notifications
You must be signed in to change notification settings - Fork 319
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
Refactor build.sh: Add OS, Distribution, Version, and Edition Support via CLI with Auto-Continue #968
base: develop
Are you sure you want to change the base?
Conversation
@ClemTheStudent, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction. |
@ClemTheStudent, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed. |
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.
Thanks for thr contribution!
A couple of nits:
- Please use English for stdout and comments.
- Please open and enhancement request and link this pull request to the issue per the contributing guidelines.
- Please use conventional commits per the contributing guidelines. See the commit history for examples.
- Please include any testing performed.
build.sh
Outdated
select_distribution() { | ||
# Check if the selected guest operating system is Linux or Windows. | ||
if [[ -n "$dist" ]]; then | ||
echo "Distribution sélectionnée : $dist" |
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.
Please use "selection".
build.sh
Outdated
@@ -454,7 +507,23 @@ select_distribution() { | |||
|
|||
# This function selects the version based on the guest operating system's distribution or type. | |||
select_version() { | |||
# Check if the selected guest operating system is Windows. | |||
if [[ -n "$version" ]]; then | |||
echo "Version sélectionnée : $version" |
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.
Please use "selection".
build.sh
Outdated
if [[ -n "$version" ]]; then | ||
echo "Version sélectionnée : $version" | ||
if [[ "$dist" == *"Windows"* ]]; then | ||
# Si l'édition est fournie, passer directement à select_build |
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.
Please use comments in English.
build.sh
Outdated
@@ -500,6 +568,12 @@ select_version() { | |||
} | |||
|
|||
select_edition() { | |||
if [[ -n "$edition" ]]; then | |||
echo "Édition sélectionnée : $edition" |
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.
Please use "selection".
build.sh
Outdated
esac | ||
done | ||
|
||
# Vérification si auto-continue est activé |
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.
Please use comments in English.
build.sh
Outdated
# Vérification si auto-continue est activé | ||
if [ "$auto_continue" = true ]; then | ||
printf "\nAuto-continue is enabled. Skipping user prompt and retrying...\n" | ||
select_version # Continue automatiquement |
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.
Please use comments in English.
build.sh
Outdated
while true; do | ||
if [ "$auto_continue" = true ]; then | ||
# Si auto-continue est activé, on continue sans prompt |
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.
Please use comments in English.
Marked as draft until CLA is completed. |
esac | ||
done | ||
|
||
# Check if auto-continue is enabled |
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.
# Check if auto-continue is enabled | |
# Check if auto-continue is enabled. |
# Check if auto-continue is enabled | ||
if [ "$auto_continue" = true ]; then | ||
printf "\nAuto-continue is enabled. Skipping user prompt and retrying...\n" | ||
select_version # automatically continue |
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.
select_version # automatically continue | |
select_version # Automatically continue. |
while true; do | ||
if [ "$auto_continue" = true ]; then | ||
# If auto-continue is enabled, proceed without prompt |
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.
# If auto-continue is enabled, proceed without prompt | |
# If auto-continue is enabled, proceed without prompt. |
Summary of Pull Request
build.sh
script to support operating system selection, distribution, version, and edition via command-line arguments.--auto-continue
option to skip manual prompts, enabling smoother automation.Type of Pull Request
type/bug
type/feature
type/refactor
type/docs
type/chore
Please describe:
Related to Existing Issues
Closes #969
Test and Documentation Coverage
Breaking Changes?