|
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
14 | 14 |
|
| 15 | +import Dependencies |
| 16 | + |
15 | 17 | enum Supporters { |
16 | 18 | static let primary: Corporate = .init(name: "Apple", |
17 | 19 | logo: .init(lightModeUrl: "/images/sponsors/apple.svg", |
18 | 20 | darkModeUrl: "/images/sponsors/apple~dark.svg", |
19 | 21 | width: 100, height: 123), |
20 | 22 | url: "http://apple.com") |
21 | 23 |
|
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 | + }() |
34 | 57 |
|
35 | 58 | nonisolated(unsafe) static var infrastructure: [Corporate] = [ |
36 | 59 | .init(name: "MacStadium", |
|
0 commit comments