-
Notifications
You must be signed in to change notification settings - Fork 21
Enable bootstrap.sh to determine OS and version on its own #162
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
Conversation
JeffMill
left a comment
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.
looks good overall, just some suggestions added.
Is there a task on ADU to fix up the way we call DO?
| installQemu | ||
| } | ||
|
|
||
| function isSupportedLinux() |
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.
all of this isSupported*, determine* stuff should be in a separate script.
You can then include those methods (I think!) using "source platform-helpers.sh" in this script. #WontFix
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.
Good point. I'll split it out when there is another script that needs the same functionality.
build/scripts/bootstrap.sh
Outdated
|
|
||
| echo "OS = $OS" | ||
| echo "VER = $VER" | ||
| if [ "$is_amd64" = true ]; then echo "Arch = amd64" |
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.
determine_os_and_arch should also return $ARCH.
(in otherwords, this code should be in determine_os_and_arch and set $ARCH) #Resolved
build/scripts/bootstrap.sh
Outdated
| echo "[INFO] Installing build dependencies" | ||
|
|
||
| if [[ "$PLATFORM" == "osx" ]]; | ||
| if [ "$is_macos" = true ]; |
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.
rather than a bunch of "is" bools, these are mutually exclusive -- helper should set an $OSFLAVOR, e.g. "linux" e.g. if $OSTYPE == linux*
#Resolved
build/scripts/bootstrap.sh
Outdated
| function isSupportedLinux() | ||
| { | ||
| if [[ "$PLATFORM" == "debian10" || "$PLATFORM" == "ubuntu1804" || "$PLATFORM" == "ubuntu2004" ]]; | ||
| if [[ ("$OS" == "ubuntu" && ($VER == "18.04" || $VER == "20.04")) |
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.
is 18.xx or 20xx not supported? Why specifically 18.04 and 20.04 ? #Resolved
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.
There was no requirement for other versions and we have not tested this on those other versions.
| echo "Failed to get cpu architecture." | ||
| return 1 | ||
| else | ||
| if [[ $arch == aarch64* || $arch == armv8* ]]; then |
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.
see my other comment -- these are mutually exclusive. e.g. $ARCH_FLAVOR="arm32" would be better IMHO #Resolved
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.
Yes, good call.
| source: . | ||
| override-build: | | ||
| ./build/scripts/bootstrap.sh --platform ubuntu2004 --install build | ||
| ./build/scripts/bootstrap.sh --install 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.
yay!!! #Resolved
|
looks good overall, just some suggestions added. Is there a task on ADU to fix up the way we call DO? In reply to: 1335530563 |
JeffreySaathoff
left a comment
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.
![]()
JeffMill
left a comment
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.
awesome, thanks
No description provided.