From 901f8a2d8a8affb8d9be2bd8f24ed503f6bcf6c0 Mon Sep 17 00:00:00 2001 From: Victor Shabanov Date: Mon, 22 Oct 2018 16:53:23 +0300 Subject: [PATCH 1/3] Fix extracting of fabric' secret key --- xcode/commonFastfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 4d1a77e..0d02e9a 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -25,8 +25,11 @@ end after_all do |lane, options| if options[:uploadToFabric] appName = options[:appName] || $appName + token = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $4}' | tr -d '\n'") - secret = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//' | tr -d '\n'") + + extractSecret = "cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//' | tr -d '\n'" + secret = sh("printf '$(#{extractSecret})'") releaseNotesFile = "release-notes.txt" sh("touch ../#{releaseNotesFile}") From ae35b548e5fa2a28abdc204904754e7dc177d69b Mon Sep 17 00:00:00 2001 From: Victor Shabanov Date: Tue, 23 Oct 2018 12:08:02 +0300 Subject: [PATCH 2/3] Fix secret extraction --- xcode/commonFastfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 0d02e9a..207de83 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -27,9 +27,7 @@ after_all do |lane, options| appName = options[:appName] || $appName token = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $4}' | tr -d '\n'") - - extractSecret = "cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//' | tr -d '\n'" - secret = sh("printf '$(#{extractSecret})'") + secret = sh("printf `cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//' | tr -d '\n'`") releaseNotesFile = "release-notes.txt" sh("touch ../#{releaseNotesFile}") From 86ab1026b87b6dc6f19fec241e5e2b8603626d80 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Tue, 23 Oct 2018 20:01:13 +0300 Subject: [PATCH 3/3] Finally it works --- xcode/commonFastfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 207de83..ab0695b 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -26,8 +26,8 @@ after_all do |lane, options| if options[:uploadToFabric] appName = options[:appName] || $appName - token = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $4}' | tr -d '\n'") - secret = sh("printf `cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//' | tr -d '\n'`") + token = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $4}' | tr -d '\\n'") + secret = sh("printf `cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//'` | tr -d '\\n'") releaseNotesFile = "release-notes.txt" sh("touch ../#{releaseNotesFile}")