Skip to content

Commit 17749f9

Browse files
authored
Merge pull request #3856 from SwiftPackageIndex/staging-sponsor-update
Sponsor update preview
2 parents 1089ae4 + 666d374 commit 17749f9

File tree

3 files changed

+35
-12
lines changed

3 files changed

+35
-12
lines changed

Public/images/sponsors/sentry.png

3.16 KB
Loading
3.16 KB
Loading

Sources/App/Core/Supporters.swift

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,48 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import Dependencies
16+
1517
enum Supporters {
1618
static let primary: Corporate = .init(name: "Apple",
1719
logo: .init(lightModeUrl: "/images/sponsors/apple.svg",
1820
darkModeUrl: "/images/sponsors/apple~dark.svg",
1921
width: 100, height: 123),
2022
url: "http://apple.com")
2123

22-
nonisolated(unsafe) static var corporate: [Corporate] = [
23-
.init(name: "Emerge Tools",
24-
logo: .init(lightModeUrl: "/images/sponsors/emerge.png",
25-
darkModeUrl: "/images/sponsors/emerge~dark.png"),
26-
url: "https://www.emergetools.com/?utm_source=spi2&utm_medium=sponsor&utm_campaign=emerge",
27-
advertisingCopy: "Join the future of mobile development. Trusted by top companies like Duolingo, Square, DoorDash & more…"),
28-
.init(name: "RevenueCat",
29-
logo: .init(lightModeUrl: "/images/sponsors/revenuecat.png",
30-
darkModeUrl: "/images/sponsors/revenuecat~dark.png"),
31-
url: "https://www.revenuecat.com/?utm_medium=sponsored&utm_source=swift_package_index&utm_campaign=general_sponsorship&utm_content=banner%20ad",
32-
advertisingCopy: "The world’s best apps use RevenueCat to power in-app purchases, manage customer data, and grow revenue."),
33-
]
24+
nonisolated(unsafe) static var corporate: [Corporate] = {
25+
@Dependency(\.environment) var environment
26+
27+
if environment.current() == .development {
28+
// Staging sponsors
29+
return [
30+
.init(name: "Sentry",
31+
logo: .init(lightModeUrl: "/images/sponsors/sentry.png",
32+
darkModeUrl: "/images/sponsors/sentry~dark.png"),
33+
url: "https://sentry.io/welcome/",
34+
advertisingCopy: "Application monitoring software considered “not bad” by 4 million developers."),
35+
.init(name: "RevenueCat",
36+
logo: .init(lightModeUrl: "/images/sponsors/revenuecat.png",
37+
darkModeUrl: "/images/sponsors/revenuecat~dark.png"),
38+
url: "https://www.revenuecat.com/?utm_medium=sponsored&utm_source=swift_package_index&utm_campaign=general_sponsorship&utm_content=banner%20ad",
39+
advertisingCopy: "The world's best apps use RevenueCat to power in-app purchases, manage customer data, and grow revenue."),
40+
]
41+
} else {
42+
// Production sponsors
43+
return [
44+
.init(name: "Emerge Tools",
45+
logo: .init(lightModeUrl: "/images/sponsors/emerge.png",
46+
darkModeUrl: "/images/sponsors/emerge~dark.png"),
47+
url: "https://www.emergetools.com/?utm_source=spi2&utm_medium=sponsor&utm_campaign=emerge",
48+
advertisingCopy: "Join the future of mobile development. Trusted by top companies like Duolingo, Square, DoorDash & more…"),
49+
.init(name: "RevenueCat",
50+
logo: .init(lightModeUrl: "/images/sponsors/revenuecat.png",
51+
darkModeUrl: "/images/sponsors/revenuecat~dark.png"),
52+
url: "https://www.revenuecat.com/?utm_medium=sponsored&utm_source=swift_package_index&utm_campaign=general_sponsorship&utm_content=banner%20ad",
53+
advertisingCopy: "The world's best apps use RevenueCat to power in-app purchases, manage customer data, and grow revenue."),
54+
]
55+
}
56+
}()
3457

3558
nonisolated(unsafe) static var infrastructure: [Corporate] = [
3659
.init(name: "MacStadium",

0 commit comments

Comments
 (0)