Skip to content

Commit 411194e

Browse files
committed
Don't swallow errors in CI and scripts
1 parent c631aa6 commit 411194e

17 files changed

+43
-12
lines changed

.github/CONTRIBUTORS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
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.
66

7-
> None so far; you could be the first! See the section below on how to contribute.
8-
>
9-
> 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)`
7+
- [Dave Abrahams](https://github.com/dabrahams)
108

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

.github/workflows/carthage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Carthage
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

.github/workflows/cocoapods.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Cocoapods
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

.github/workflows/documentation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Documentation
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

.github/workflows/publish-cocoapods.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Publish CocoaPods
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
release:
47
types: [published]

.github/workflows/swift-package.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Swift Package
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

.github/workflows/swiftlint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: SwiftLint
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

.github/workflows/upload-assets.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Upload Assets
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
release:
47
types: [published]

.github/workflows/xcframework.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: XCFramework
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

.github/workflows/xcodebuild.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Xcode Project
1+
: Xcode Project
2+
defaults:
3+
run:
4+
shell: bash -eo pipefail {0}
25
on:
36
workflow_dispatch:
47
push:

Sources/Half/Functions.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
// Copyright © 2022 SomeRandomiOSDev. All rights reserved.
66
//
77

8+
#if os(Linux)
9+
import Glibc
10+
#else
11+
import Darwin
12+
#endif
13+
814
// Implmentation of public functions found in swift/stdlib/public/Platform for Half precision.
915
//
1016
// For the sake of simplicity, we'll implement these functions by casting up the

scripts/carthage.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -e -o pipefail
22
#
33
# carthage.sh
44
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.
@@ -8,9 +8,9 @@
88
# Needed to circumvent an issue with Carthage version < 0.37.0: https://github.com/Carthage/Carthage/issues/3019
99

1010
VERSION="$(carthage version)"
11-
"$(dirname "$0")/versions.sh" "$VERSION" "0.37.0"
11+
comparison=$("$(dirname "$0")/versions.sh" "$VERSION" "0.37.0"; echo $?)
1212

13-
if [ $? -ge 0 ]; then
13+
if [ "$comparison" -ge 0 ]; then
1414
# Carthage version is greater than or equal to 0.37.0 meaning we can use the --use-xcframeworks flag
1515
carthage "$@" --use-xcframeworks
1616
else

scripts/findproject.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -e -o pipefail
22
#
33
# findproject.sh
44
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.

scripts/printformat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -e -o pipefail
22
#
33
# printformat.sh
44
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.

scripts/resolvepath.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -e -o pipefail
22
#
33
# resolvepath.sh
44
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.

scripts/versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -e -o pipefail
22
#
33
# versions.sh
44
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.

scripts/xcframework.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -e -o pipefail
22
#
33
# xcframework.sh
44
# Copyright © 2022 SomeRandomiOSDev. All rights reserved.

0 commit comments

Comments
 (0)