From 6f2b188811526aa70ccd30f0ce5a17d24d22c3a8 Mon Sep 17 00:00:00 2001 From: VaultIt Dev Date: Mon, 25 May 2020 17:32:28 -0600 Subject: [PATCH] [master] - All js dependencies gone, they were more trouble than they were worth - TT --- deploy_pod.sh | 15 ++++++--------- edit-plist.sh | 5 +++-- fastlane/Fastfile | 24 +++++++++++++++++++++++- fastlane/README.md | 15 +++++++++++++++ 4 files changed, 47 insertions(+), 12 deletions(-) diff --git a/deploy_pod.sh b/deploy_pod.sh index ed6a40481..ed4b784f2 100755 --- a/deploy_pod.sh +++ b/deploy_pod.sh @@ -8,16 +8,13 @@ git checkout master git reset --hard origin/master git clean -df -# do the podspec stuff -npm install -g podspec-bump -podspec-bump -w - # commit the podspec bump -./edit-plist.sh `podspec-bump --dump-version` -git commit -am "[ci skip] publishing pod version: `podspec-bump --dump-version`" -git tag "`podspec-bump --dump-version`" -git push https://${PERSONAL_ACCESS_TOKEN}@github.com/Tyler-Keith-Thompson/Workflow.git HEAD -u $(podspec-bump --dump-version) +fastlane patch +version=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" Workflow/Info.plist` +git commit -am "[ci skip] publishing pod version: $version" +git tag "$version" +git push https://${PERSONAL_ACCESS_TOKEN}@github.com/Tyler-Keith-Thompson/Workflow.git HEAD -u $version git reset --hard git clean -df -curl --data "{\"tag_name\": \"`podspec-bump --dump-version`\",\"target_commitish\": \"master\",\"name\": \"`podspec-bump --dump-version`\",\"body\": \"Release of version `podspec-bump --dump-version`\",\"draft\": false,\"prerelease\": false}" -H "Authorization: token $PERSONAL_ACCESS_TOKEN" "https://api.github.com/repos/Tyler-Keith-Thompson/Workflow/releases" +curl --data "{\"tag_name\": \"$version\",\"target_commitish\": \"master\",\"name\": \"$version\",\"body\": \"Release of version $version\",\"draft\": false,\"prerelease\": false}" -H "Authorization: token $PERSONAL_ACCESS_TOKEN" "https://api.github.com/repos/Tyler-Keith-Thompson/Workflow/releases" pod trunk push DynamicWorkflow.podspec --allow-warnings \ No newline at end of file diff --git a/edit-plist.sh b/edit-plist.sh index 4791a9e9a..df448fc90 100755 --- a/edit-plist.sh +++ b/edit-plist.sh @@ -1,3 +1,4 @@ version=$1 -/usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${version}'" Workflow/Info.plist -echo "Set plist version to $version" \ No newline at end of file +pathToPlist=$2 +/usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${version}'" $pathToPlist +echo "Set plist version to $version in $pathToPlist" \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index cb19c9afd..4e10fe43d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,4 +18,26 @@ platform :ios do workspace: 'Workflow.xcworkspace' ) end -end + + desc "Release a new version with a patch bump_type" + lane :patch do + release("patch") + end + + desc "Release a new version with a minor bump_type" + lane :minor do + release("minor") + end + + desc "Release a new version with a major bump_type" + lane :major do + release("major") + end + + def release(type) + podspec_name = "DynamicWorkflow.podspec" + version = version_bump_podspec(path: podspec_name, + bump_type: type) + sh("./../edit-plist.sh", version, "../Workflow/Info.plist") + end +end \ No newline at end of file diff --git a/fastlane/README.md b/fastlane/README.md index cf2afcb13..b903df445 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -21,6 +21,21 @@ or alternatively using `brew cask install fastlane` fastlane ios unit_test ``` +### ios patch +``` +fastlane ios patch +``` +Release a new version with a patch bump_type +### ios minor +``` +fastlane ios minor +``` +Release a new version with a minor bump_type +### ios major +``` +fastlane ios major +``` +Release a new version with a major bump_type ----