-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: no debug symbols as default and add a command to build with deb…
…ug symbols
- Loading branch information
1 parent
15280bd
commit f1c867b
Showing
3 changed files
with
35 additions
and
1 deletion.
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
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,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
case "$OSTYPE" in | ||
darwin*) | ||
if ! type gsed &> /dev/null; then | ||
echo "GNU sed not found! You can install via Homebrew" >&2 | ||
echo >&2 | ||
echo " brew install gnu-sed" >&2 | ||
exit 1 | ||
fi | ||
SED=gsed | ||
;; | ||
*) | ||
SED=sed | ||
;; | ||
esac | ||
|
||
function restore_manifest_file () { | ||
${SED} -i -e '/\[profile.release\]/{n;d}' Cargo.toml | ||
} | ||
|
||
trap restore_manifest_file EXIT | ||
|
||
function main() { | ||
${SED} -i "/\[profile.release\]/adebug = true" Cargo.toml | ||
make prod | ||
} | ||
|
||
main "$@" |