Skip to content

Commit

Permalink
Merge pull request #120 from MythicApp/fix-main-b
Browse files Browse the repository at this point in the history
fix ci failing on main branch
  • Loading branch information
marcusziade authored Jun 24, 2024
2 parents b4320ac + 54aeb80 commit 4ac2e4a
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 39 deletions.
70 changes: 46 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
name: Build

on:
push:
paths:
- '.github/workflows/build.yml'
- 'Mythic.xcodeproj/**'
- 'Mythic/**'
pull_request:
paths:
- '.github/workflows/build.yml'
- 'Mythic.xcodeproj/**'
- 'Mythic/**'
workflow_dispatch:
push:
paths:
- '.github/workflows/build.yml'
- 'Mythic.xcodeproj/**'
- 'Mythic/**'
pull_request:
paths:
- '.github/workflows/build.yml'
- 'Mythic.xcodeproj/**'
- 'Mythic/**'
workflow_dispatch:

jobs:
build:
build:
runs-on: macos-14

steps:
- uses: actions/checkout@v4

- name: Checkout repository
uses: actions/checkout@v4

- name: Debug - List directory contents
run: ls -R

- name: Debug - Print environment variables
run: env

- name: Install Command Line Tools for Xcode (if it's not installed)
run: |
if xcode-select --version >/dev/null 2>&1; then
echo "Xcode Command Line Tools is installed, skipping."
else
echo "Xcode Command Line Tools is not installed, installing."
xcode-select --install
fi
echo "Checking Xcode Command Line Tools..."
if xcode-select --version >/dev/null 2>&1; then
echo "Xcode Command Line Tools is installed, skipping."
else
echo "Xcode Command Line Tools is not installed, installing."
xcode-select --install
fi
- name: Debug - Xcode version
run: xcodebuild -version

- name: Debug - Available Xcode schemes
run: xcodebuild -list -project Mythic.xcodeproj

- name: Build
run: xcodebuild -scheme Mythic CODE_SIGNING_ALLOWED=NO SWIFTLINT=NO
run: |
echo "Starting build process..."
set -x # Enable command echoing
xcodebuild -scheme Mythic CODE_SIGNING_ALLOWED=NO SWIFTLINT=NO -verbose
set +x # Disable command echoing
- name: Debug - Build artifacts
if: failure()
run: |
echo "Listing build artifacts..."
ls -R ~/Library/Developer/Xcode/DerivedData
17 changes: 17 additions & 0 deletions Mythic/Utilities/SparkleController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Sparkle

final class SparkleController: ObservableObject {
var updaterController: SPUStandardUpdaterController

var updater: SPUUpdater {
updaterController.updater
}

init() {
updaterController = SPUStandardUpdaterController(
startingUpdater: true,
updaterDelegate: nil,
userDriverDelegate: nil
)
}
}
22 changes: 7 additions & 15 deletions Mythic/Views/Navigation/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,14 @@ struct MainView: View {
.frame(maxHeight: 40)
}

#if DEBUG
VStack {
if let displayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String,
let shortVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String,
let bundleVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String {
Text("\(displayName) \(shortVersion) (\(bundleVersion))")
}

if let version = Engine.version {
Text("Mythic Engine \(version)")
}
if let displayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String,
let shortVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String,
let bundleVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String {
Text("\(displayName) \(shortVersion) (\(bundleVersion))")
.font(.footnote)
.foregroundStyle(.placeholder)
.padding(.bottom)
}
.font(.footnote)
.foregroundStyle(.placeholder)
.padding(.bottom)
#endif
}, detail: {
HomeView()
}
Expand Down
Empty file added temp.go
Empty file.

0 comments on commit 4ac2e4a

Please sign in to comment.