Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build CodeEdit
env:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: xcodebuild -scheme CodeEdit -configuration Release -derivedDataPath "$RUNNER_TEMP/DerivedData" -archivePath "$RUNNER_TEMP/CodeEdit.xcarchive" -skipPackagePluginValidation DEVELOPMENT_TEAM=$APPLE_TEAM_ID archive
run: xcodebuild -scheme CodeEdit -configuration Alpha -derivedDataPath "$RUNNER_TEMP/DerivedData" -archivePath "$RUNNER_TEMP/CodeEdit.xcarchive" -skipPackagePluginValidation DEVELOPMENT_TEAM=$APPLE_TEAM_ID archive

############################
# Sign
Expand Down
410 changes: 408 additions & 2 deletions CodeEdit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions CodeEdit/Features/About/Views/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public struct AboutView: View {
Bundle.buildString ?? "No Build"
}

private var appVersionPostfix: String {
Bundle.versionPostfix ?? ""
}

public var body: some View {
HStack(spacing: 0) {
logo
Expand All @@ -45,7 +49,7 @@ public struct AboutView: View {
private var topMetaData: some View {
VStack(alignment: .leading, spacing: 5) {
Text("CodeEdit").font(.system(size: 38, weight: .regular))
Text("Version \(appVersion) (\(appBuild))")
Text("Version \(appVersion)\(appVersionPostfix) (\(appBuild))")
.textSelection(.enabled)
.foregroundColor(.secondary)
.font(.system(size: 13, weight: .light))
Expand All @@ -54,7 +58,9 @@ public struct AboutView: View {

private var bottomMetaData: some View {
VStack(alignment: .leading, spacing: 5) {
Text("Copyright © 2022 CodeEdit")
if let copyright = Bundle.copyrightString {
Text(copyright)
}
Text("MIT License")
}
.foregroundColor(.secondary)
Expand Down
9 changes: 7 additions & 2 deletions CodeEdit/Features/Welcome/Views/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ struct WelcomeView: View {
Bundle.buildString ?? ""
}

private var appVersionPostfix: String {
Bundle.versionPostfix ?? ""
}

/// Get the macOS version & build
private var macOSVersion: String {
let url = URL(fileURLWithPath: "/System/Library/CoreServices/SystemVersion.plist")
Expand Down Expand Up @@ -87,7 +91,7 @@ struct WelcomeView: View {

/// Get program and operating system information
private func copyInformation() {
var copyString = "CodeEdit: \(appVersion) (\(appBuild))\n"
var copyString = "CodeEdit: \(appVersion)\(appVersionPostfix) (\(appBuild))\n"

copyString.append("macOS: \(macOSVersion)\n")

Expand All @@ -111,8 +115,9 @@ struct WelcomeView: View {
.font(.system(size: 38))
Text(
String(
format: NSLocalizedString("Version %@ (%@)", comment: ""),
format: NSLocalizedString("Version %@%@ (%@)", comment: ""),
appVersion,
appVersionPostfix,
appBuild
)
)
Expand Down
6 changes: 4 additions & 2 deletions CodeEdit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CE_VERSION_POSTFIX</key>
<string>${CE_VERSION_POSTFIX}</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
Expand Down Expand Up @@ -1264,7 +1266,7 @@
<string>https://github.com/CodeEditApp/CodeEdit/releases/download/latest/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>/vAnxnK9wj4IqnUt6wS9EN3Ug69zHb+S/Pb9CyZuwa0=</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
</dict>
</plist>
8 changes: 8 additions & 0 deletions CodeEdit/Utils/Extensions/Bundle/Bundle+Info.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import Foundation

extension Bundle {

static var copyrightString: String? {
Bundle.main.object(forInfoDictionaryKey: "NSHumanReadableCopyright") as? String
}

/// Returns the main bundle's version string if available (e.g. 1.0.0)
static var versionString: String? {
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
Expand All @@ -18,4 +22,8 @@ extension Bundle {
static var buildString: String? {
Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
}

static var versionPostfix: String? {
Bundle.main.object(forInfoDictionaryKey: "CE_VERSION_POSTFIX") as? String
}
}
12 changes: 12 additions & 0 deletions Configs/Alpha.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Alpha.xcconfig
// CodeEdit
//
// Created by Lukas Pistrol on 14.01.23.
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

CE_APPICON_NAME = AppIconAlpha
CE_VERSION_POSTFIX = -alpha
12 changes: 12 additions & 0 deletions Configs/Beta.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Beta.xcconfig
// CodeEdit
//
// Created by Lukas Pistrol on 14.01.23.
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

CE_APPICON_NAME = AppIconBeta
CE_VERSION_POSTFIX = -beta
12 changes: 12 additions & 0 deletions Configs/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Debug.xcconfig
// CodeEdit
//
// Created by Lukas Pistrol on 14.01.23.
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

CE_APPICON_NAME = AppIconDev
CE_VERSION_POSTFIX = -dev
12 changes: 12 additions & 0 deletions Configs/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Release.xcconfig
// CodeEdit
//
// Created by Lukas Pistrol on 14.01.23.
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

CE_APPICON_NAME = AppIcon
// CE_VERSION_POSTFIX = // this is a placeholder since we don't want a postfix in final release