From 9d92fdbda89a05bc2d860ec7a1f87d9570180ee4 Mon Sep 17 00:00:00 2001
From: Max Goedjen <max.goedjen@gmail.com>
Date: Sun, 15 Mar 2020 01:00:11 -0700
Subject: [PATCH] Build.

---
 .github/workflows/release.yml       |  6 ++++++
 Config.xcconfig                     |  1 -
 Config/Config.xcconfig              |  1 +
 Secretive.xcodeproj/project.pbxproj | 14 +++++++++-----
 4 files changed, 16 insertions(+), 6 deletions(-)
 delete mode 100644 Config.xcconfig
 create mode 100644 Config/Config.xcconfig

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index df78850..d1d0b46 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -28,6 +28,12 @@ jobs:
         HOST_PROFILE_DATA: ${{ secrets.HOST_PROFILE_DATA }}
         AGENT_PROFILE_DATA: ${{ secrets.AGENT_PROFILE_DATA }}
       run: ./.github/scripts/signing.sh
+    - name: Update Build Number
+      env:
+        TAG_NAME: ${{ github.ref }}
+      run: |
+            export CLEAN_TAG=$(echo $TAG_NAME | sed -e 's/v//')
+            sed -i '' -e "s/CI_VERSION = 0.0.0/CI_VERSION = $CLEAN_TAG/g" Config/Config.xcconfig
     - name: Build
       run: xcrun xcodebuild -project Secretive.xcodeproj -scheme Secretive -configuration Release -archivePath Archive.xcarchive archive
     - name: Create ZIPs
diff --git a/Config.xcconfig b/Config.xcconfig
deleted file mode 100644
index 9f7b9d4..0000000
--- a/Config.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-CI_VERSION = 0.0.0
diff --git a/Config/Config.xcconfig b/Config/Config.xcconfig
new file mode 100644
index 0000000..45630c8
--- /dev/null
+++ b/Config/Config.xcconfig
@@ -0,0 +1 @@
+CI_VERSION = 1.1.1
diff --git a/Secretive.xcodeproj/project.pbxproj b/Secretive.xcodeproj/project.pbxproj
index 42a71ee..b87464c 100644
--- a/Secretive.xcodeproj/project.pbxproj
+++ b/Secretive.xcodeproj/project.pbxproj
@@ -33,8 +33,6 @@
 		50731666241DF8660023809E /* Updater.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50731665241DF8660023809E /* Updater.swift */; };
 		50731669241E00C20023809E /* NoticeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50731668241E00C20023809E /* NoticeView.swift */; };
 		508A58AA241E06B40069DC07 /* PreviewUpdater.swift in Sources */ = {isa = PBXBuildFile; fileRef = 508A58A9241E06B40069DC07 /* PreviewUpdater.swift */; };
-		508A58AC241E121B0069DC07 /* Config.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 508A58AB241E121B0069DC07 /* Config.xcconfig */; };
-		508A58AD241E121B0069DC07 /* Config.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 508A58AB241E121B0069DC07 /* Config.xcconfig */; };
 		5099A02423FD2AAA0062B6F2 /* CreateSecretView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5099A02323FD2AAA0062B6F2 /* CreateSecretView.swift */; };
 		5099A02723FE34FA0062B6F2 /* SmartCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5099A02623FE34FA0062B6F2 /* SmartCard.swift */; };
 		5099A02923FE35240062B6F2 /* SmartCardStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5099A02823FE35240062B6F2 /* SmartCardStore.swift */; };
@@ -276,7 +274,6 @@
 		50617D7623FCE48D0099B055 = {
 			isa = PBXGroup;
 			children = (
-				508A58AB241E121B0069DC07 /* Config.xcconfig */,
 				50617D8123FCE48E0099B055 /* Secretive */,
 				50617D9723FCE48E0099B055 /* SecretiveTests */,
 				50617DA923FCE4AB0099B055 /* SecretKit */,
@@ -284,6 +281,7 @@
 				50A3B78B24026B7500D209EA /* SecretAgent */,
 				5099A06D240242BA0062B6F2 /* SecretAgentKit */,
 				5099A07A240242BA0062B6F2 /* SecretAgentKitTests */,
+				508A58AF241E144C0069DC07 /* Config */,
 				50617D8023FCE48E0099B055 /* Products */,
 				5099A08B240243730062B6F2 /* Frameworks */,
 			);
@@ -394,6 +392,14 @@
 			path = OpenSSH;
 			sourceTree = "<group>";
 		};
+		508A58AF241E144C0069DC07 /* Config */ = {
+			isa = PBXGroup;
+			children = (
+				508A58AB241E121B0069DC07 /* Config.xcconfig */,
+			);
+			path = Config;
+			sourceTree = "<group>";
+		};
 		5099A02523FE34DE0062B6F2 /* SmartCard */ = {
 			isa = PBXGroup;
 			children = (
@@ -685,7 +691,6 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				508A58AC241E121B0069DC07 /* Config.xcconfig in Resources */,
 				50617D8D23FCE48E0099B055 /* Main.storyboard in Resources */,
 				50617D8A23FCE48E0099B055 /* Preview Assets.xcassets in Resources */,
 				50617D8723FCE48E0099B055 /* Assets.xcassets in Resources */,
@@ -731,7 +736,6 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				508A58AD241E121B0069DC07 /* Config.xcconfig in Resources */,
 				50A3B79724026B7600D209EA /* Main.storyboard in Resources */,
 				50A3B79424026B7600D209EA /* Preview Assets.xcassets in Resources */,
 				50A3B79124026B7600D209EA /* Assets.xcassets in Resources */,