forked from alire-project/alire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alire_common.gpr: remove default host os to avoid mistakes on macOS (a…
…lire-project#1298) * alire_common.gpr: remove default host os to avoid mistakes on macOS With the default being Linux, macOS users will not notice any issue until they try to use the executable. Even then the issue will be obscure. * Remove any implicit detection of the host OS This should avoid misbuilds that mix Linux/macOS. A bash function is now provided for detection of the OS in our scripts. --------- Co-authored-by: Alejandro R. Mosteo <[email protected]>
- Loading branch information
1 parent
748b833
commit f9b34b5
Showing
15 changed files
with
132 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ on: | |
release: | ||
types: [created] | ||
|
||
env: | ||
ALIRE_OS: "windows" | ||
|
||
jobs: | ||
|
||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# Import reusable bits | ||
pushd $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) > /dev/null | ||
. functions.sh | ||
popd > /dev/null | ||
|
||
export ALIRE_OS=$(get_OS) | ||
|
||
echo Building with ALIRE_OS=$ALIRE_OS... | ||
gprbuild -j0 -r -p -P `dirname $0`/../alr_env.gpr "$@" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
function guess_OS() { | ||
# Returns one of the values needed in ALIRE_OS, using environment variables | ||
|
||
if [ -n "$WINDIR" ]; then | ||
echo windows | ||
elif [ -n "$OSTYPE" ]; then | ||
case "$OSTYPE" in # only available on bash shells | ||
"linux-gnu") | ||
echo linux | ||
;; | ||
"freebsd") | ||
echo freebsd | ||
;; | ||
"darwin"*) # varies with versions: darwin18, darwin19, etc. | ||
echo macos | ||
;; | ||
*) | ||
echo unknown # give up, builds depending on ALIRE_OS will fail. | ||
;; | ||
esac | ||
else | ||
echo unknown | ||
fi | ||
} | ||
|
||
function get_OS() { | ||
# Returns one of the values needed in ALIRE_OS, using `uname`` | ||
|
||
OS=`uname -s` | ||
|
||
case "$OS" in | ||
"Linux") | ||
echo linux | ||
;; | ||
"FreeBSD") | ||
echo freebsd | ||
;; | ||
"Darwin") | ||
echo macos | ||
;; | ||
"Windows") | ||
echo windows | ||
;; | ||
*) | ||
# Fall back to use environment clues | ||
guess_OS | ||
;; | ||
esac | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters