Skip to content

Don't swallow errors in CI or scripts #15

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

I would like to give a special thanks to all of the people below who have contributed to this project and to all of those who will contribute to it moving forward.

> None so far; you could be the first! See the section below on how to contribute.
>
> To the first person contributing to this project, please remove this block and replace it with your information using the following format: `- [Your Name](https://github.com/YourGitHubUsername)`
- [Dave Abrahams](https://github.com/dabrahams)

## I would like to join this list! How can I help the project?

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/carthage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Carthage
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cocoapods.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Cocoapods
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Documentation
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish-cocoapods.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Publish CocoaPods
defaults:
run:
shell: bash -eo pipefail {0}
on:
release:
types: [published]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/swift-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Swift Package
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: SwiftLint
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/upload-assets.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Upload Assets
defaults:
run:
shell: bash -eo pipefail {0}
on:
release:
types: [published]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/xcframework.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: XCFramework
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Xcode Project
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_dispatch:
push:
Expand Down
6 changes: 3 additions & 3 deletions scripts/carthage.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e -o pipefail
#
# carthage.sh
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
Expand All @@ -8,9 +8,9 @@
# Needed to circumvent an issue with Carthage version < 0.37.0: https://github.com/Carthage/Carthage/issues/3019

VERSION="$(carthage version)"
"$(dirname "$0")/versions.sh" "$VERSION" "0.37.0"
comparison=$("$(dirname "$0")/versions.sh" "$VERSION" "0.37.0"; echo $?)

if [ $? -ge 0 ]; then
if [ "$comparison" -ge 0 ]; then
# Carthage version is greater than or equal to 0.37.0 meaning we can use the --use-xcframeworks flag
carthage "$@" --use-xcframeworks
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/findproject.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e -o pipefail
#
# findproject.sh
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/printformat.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e -o pipefail
#
# printformat.sh
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/resolvepath.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e -o pipefail
#
# resolvepath.sh
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e -o pipefail
#
# versions.sh
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion scripts/xcframework.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env bash -e -o pipefail
#
# xcframework.sh
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
Expand Down