Skip to content

Commit

Permalink
Merge branch 'trunk' into andrewdmontgomery/cleanup-swiftlint-removal
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdmontgomery committed Nov 1, 2024
2 parents 5ef215a + 99f0b8b commit d08442a
Show file tree
Hide file tree
Showing 85 changed files with 112 additions and 494 deletions.
9 changes: 3 additions & 6 deletions .buildkite/commands/upload-to-appcenter.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#!/bin/bash -eu

NAME=$1
NAME_LOWERCASED="$(echo "$NAME" | tr '[:upper:]' '[:lower:]')"

echo "--- :arrow_down: Downloading Prototype Build"
buildkite-agent artifact download ".build/artifacts/*.ipa" . --step "build_$NAME_LOWERCASED"
buildkite-agent artifact download ".build/artifacts/*.app.dSYM.zip" . --step "build_$NAME_LOWERCASED"
buildkite-agent artifact download ".build/artifacts/*.ipa" . --step "build_demo"
buildkite-agent artifact download ".build/artifacts/*.app.dSYM.zip" . --step "build_demo"

echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :hammer_and_wrench: Uploading"
bundle exec fastlane ios upload_demo_to_appcenter name:"$NAME" build_number:"$BUILDKITE_BUILD_NUMBER"
bundle exec fastlane ios upload_demo_to_appcenter build_number:"$BUILDKITE_BUILD_NUMBER"
29 changes: 6 additions & 23 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,36 +66,19 @@ steps:
###################
- group: ":appcenter: Prototype Builds"
steps:
- label: "🛠️ Build SwiftUI Demo"
key: build_swiftui
- label: "🛠️ Build Demo"
key: build_demo
depends_on: test
plugins: [$CI_TOOLKIT]
command: |
install_gems
BUILD_NUMBER=$BUILDKITE_BUILD_NUMBER make build-demo-for-distribution-swiftui
BUILD_NUMBER=$BUILDKITE_BUILD_NUMBER make build-demo-for-distribution
artifact_paths:
- ".build/artifacts/*.ipa"
- ".build/artifacts/*.dSYM.zip"

- label: "⬆️ Upload SwiftUI Demo to App Center"
depends_on: build_swiftui
- label: "⬆️ Upload Demo to App Center"
depends_on: build_demo
plugins: [$CI_TOOLKIT]
command: .buildkite/commands/upload-to-appcenter.sh SwiftUI
if: build.pull_request.id != null

- label: "🛠️ Build UIKit Demo"
key: build_uikit
depends_on: test
plugins: [$CI_TOOLKIT]
command: |
install_gems
BUILD_NUMBER=$BUILDKITE_BUILD_NUMBER make build-demo-for-distribution-uikit
artifact_paths:
- ".build/artifacts/*.ipa"
- ".build/artifacts/*.dSYM.zip"

- label: "⬆️ Upload UIKit Demo to App Center"
depends_on: build_uikit
plugins: [$CI_TOOLKIT]
command: .buildkite/commands/upload-to-appcenter.sh UIKit
command: .buildkite/commands/upload-to-appcenter.sh
if: build.pull_request.id != null
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Gravatar-UIKit-Demo.Base.xcconfig"
#include "Gravatar-Demo.Base.xcconfig"
#include "../Enterprise.xcconfig"

// Declared explicitly rather than by building on top of what's defined in Base so it can be read by other tools such as Fastlane
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
//
// MainTableViewController.swift
// Gravatar-Demo
//
// Created by Pinar Olguc on 24.01.2024.
//

import Foundation
import UIKit
import SwiftUI

class MainTableViewController: UITableViewController {

enum Row: Int, CaseIterable {
case swiftUI
case imageDownloadNetworking
case uiImageViewExtension
case fetchProfile
Expand Down Expand Up @@ -40,8 +36,12 @@ class MainTableViewController: UITableViewController {
guard let row = Row(rawValue: indexPath.row) else { return UITableViewCell() }
let cell = tableView.dequeueReusableCell(withIdentifier: Self.reuseID, for: indexPath)
var content = cell.defaultContentConfiguration()
cell.accessoryType = .disclosureIndicator

switch row {
case .swiftUI:
content.text = "SwiftUI Demos"
cell.accessoryType = .none
case .imageDownloadNetworking:
content.text = "Image download - Networking"
case .uiImageViewExtension:
Expand Down Expand Up @@ -73,6 +73,12 @@ class MainTableViewController: UITableViewController {
guard let row = Row(rawValue: indexPath.row) else { return }

switch row {
case .swiftUI:
let swiftUIContentViewController = UIHostingController(rootView: ContentView(onDismiss: { [weak self] in
self?.dismiss(animated: true)
}))
swiftUIContentViewController.modalPresentationStyle = .fullScreen
present(swiftUIContentViewController, animated: true)
case .imageDownloadNetworking:
let vc = DemoAvatarDownloadViewController()
navigationController?.pushViewController(vc, animated: true)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import SwiftUI
import GravatarUI

struct ContentView: View {
let onDismiss: (() -> Void)?

enum Page: String, CaseIterable, Identifiable {
case avatarView = "Avatar view"
case avatarPickerView = "Avatar picker view"
Expand All @@ -27,6 +29,15 @@ struct ContentView: View {
}
.navigationTitle("Gravatar SwiftUI Demo")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
if let onDismiss {
ToolbarItem(placement: .topBarLeading) {
Button("Dismiss") {
onDismiss()
}
}
}
}
}
}

Expand All @@ -44,5 +55,5 @@ struct ContentView: View {
}

#Preview {
ContentView()
ContentView(onDismiss: nil)
}
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
33 changes: 0 additions & 33 deletions Demo/Demo/Gravatar-SwiftUI-Demo/DemoApp.swift

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions Demo/Demo/Gravatar-UIKit-Demo/Assets.xcassets/Contents.json

This file was deleted.

Loading

0 comments on commit d08442a

Please sign in to comment.