From 53bd8ded6063aeb329a771aec99ae1f05846662c Mon Sep 17 00:00:00 2001 From: Stephen Marshall Date: Wed, 25 Oct 2023 14:19:15 -0400 Subject: [PATCH] WIP --- _Jenkinsfile => Jenkinsfile | 10 ++++++---- .../PlaybookShowcase.xcodeproj/project.pbxproj | 6 ++++++ PlaybookShowcase/Versioning.xcconfig | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) rename _Jenkinsfile => Jenkinsfile (95%) create mode 100644 PlaybookShowcase/Versioning.xcconfig diff --git a/_Jenkinsfile b/Jenkinsfile similarity index 95% rename from _Jenkinsfile rename to Jenkinsfile index 16e17c1e1..3f355eac1 100644 --- a/_Jenkinsfile +++ b/Jenkinsfile @@ -79,7 +79,10 @@ def runNodeWith(label, block, isShort) { stage('Checkout') { checkout scm } - + stage('Update Build Number') { + sh "echo \"CURRENT_PROJECT_VERSION = ${buildNumber}\" > ./PlaybookShowcase/Versioning.xcconfig" + sh "echo $(cat ./PlaybookShowcase/Versioning.xcconfig)" + } if (isShort == false) { stage('Dependencies') { sh 'make dependencies' @@ -327,9 +330,8 @@ def updateBuildNumber() { // clone repo dir('.buildnumber') { try { - // sh 'git clone --depth 5 git@github.com:powerhome/nitro-buildnumber.git .' - // buildNumber = sh(returnStdout: true, script: './increment PlaybookSwift-version').trim().toInteger() - buildNumber = 666 + sh 'git clone --depth 5 git@github.com:powerhome/nitro-buildnumber.git .' + buildNumber = sh(returnStdout: true, script: './increment PlaybookSwift-version').trim().toInteger() print "Build number: ${buildNumber}" } finally { diff --git a/PlaybookShowcase/PlaybookShowcase.xcodeproj/project.pbxproj b/PlaybookShowcase/PlaybookShowcase.xcodeproj/project.pbxproj index ad1a59a9b..b48997fb8 100644 --- a/PlaybookShowcase/PlaybookShowcase.xcodeproj/project.pbxproj +++ b/PlaybookShowcase/PlaybookShowcase.xcodeproj/project.pbxproj @@ -8,6 +8,8 @@ /* Begin PBXBuildFile section */ 639039872A13A496004576FF /* ContentListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639039862A13A496004576FF /* ContentListView.swift */; }; + 8F6D944E2AE98ED800AF0D15 /* Versioning.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 8F6D944D2AE98ED800AF0D15 /* Versioning.xcconfig */; }; + 8F6D944F2AE98ED800AF0D15 /* Versioning.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 8F6D944D2AE98ED800AF0D15 /* Versioning.xcconfig */; }; F905151B29F03B0700F9B66D /* PlaybookShowcaseApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F905151A29F03B0700F9B66D /* PlaybookShowcaseApp.swift */; }; F905151F29F03B0700F9B66D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F905151E29F03B0700F9B66D /* Assets.xcassets */; }; F905152229F03B0700F9B66D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F905152129F03B0700F9B66D /* Preview Assets.xcassets */; }; @@ -21,6 +23,7 @@ /* Begin PBXFileReference section */ 639039862A13A496004576FF /* ContentListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentListView.swift; sourceTree = ""; }; + 8F6D944D2AE98ED800AF0D15 /* Versioning.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Versioning.xcconfig; sourceTree = ""; }; F905151829F03B0700F9B66D /* PlaybookShowcase-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PlaybookShowcase-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; F905151A29F03B0700F9B66D /* PlaybookShowcaseApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaybookShowcaseApp.swift; sourceTree = ""; }; F905151E29F03B0700F9B66D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; @@ -82,6 +85,7 @@ F9370FC929EDCC0100FFD0DF = { isa = PBXGroup; children = ( + 8F6D944D2AE98ED800AF0D15 /* Versioning.xcconfig */, F937100029EDCC1900FFD0DF /* Packages */, F905151929F03B0700F9B66D /* PlaybookShowcase */, F905154729F03B3C00F9B66D /* PlaybookShowcase-macOS */, @@ -203,6 +207,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8F6D944E2AE98ED800AF0D15 /* Versioning.xcconfig in Resources */, F905152229F03B0700F9B66D /* Preview Assets.xcassets in Resources */, F905151F29F03B0700F9B66D /* Assets.xcassets in Resources */, ); @@ -212,6 +217,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8F6D944F2AE98ED800AF0D15 /* Versioning.xcconfig in Resources */, F943570A29F070F10051C650 /* Preview Assets.xcassets in Resources */, F943570929F070E90051C650 /* Assets.xcassets in Resources */, ); diff --git a/PlaybookShowcase/Versioning.xcconfig b/PlaybookShowcase/Versioning.xcconfig new file mode 100644 index 000000000..c07c20c8a --- /dev/null +++ b/PlaybookShowcase/Versioning.xcconfig @@ -0,0 +1 @@ +CURRENT_PROJECT_VERSION = 135.3