From 2e4fd327cb04e9f2d1a076add93d15385559403a Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 17 May 2022 15:23:35 -0400 Subject: initial scripts --- scripts/Phase2.sh | 19 +++++++++++++++++++ scripts/phase1.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 scripts/Phase2.sh create mode 100755 scripts/phase1.sh diff --git a/scripts/Phase2.sh b/scripts/Phase2.sh new file mode 100644 index 000000000..9d5f64ff3 --- /dev/null +++ b/scripts/Phase2.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x phase1.sh +# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps + +echo "Hello World" + +# 1 bump version in projectFile +# sed stream edit. It's fast, and can make changes. +version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) +build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) +echo "Version "$version_number +echo "build "$build_number + +# 2 update version in podspec +# SmartDeviceLink-iOS.podspec + diff --git a/scripts/phase1.sh b/scripts/phase1.sh new file mode 100755 index 000000000..9932f15b2 --- /dev/null +++ b/scripts/phase1.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x phase1.sh +# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps + +echo "Zug Zug" + +# 2 push new release to primary cocoapod +echo "2 push new release to primary Cocoapod" +pod trunk push SmartDeviceLink.podspec --allow-warnings + +# 3 Push the new release to the secondary cocoapod using command line: +echo "3 Push the new release to the secondary cocoapod using command line:" +pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. + +# 4 add binary xcframework archive for manual installation +echo "4 add binary xcframework archive for manual installation" +# i +echo "4.i" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO + +# ii +echo "4.ii" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO + +# iii +echo "4.iii" +xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' + +echo "Work Complete" \ No newline at end of file -- cgit v1.2.1 From 9b025ce97032c2f9ff875ab9f0b97ebf9cdaac2d Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 17 May 2022 15:32:21 -0400 Subject: initial script --- scripts/phase1.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 scripts/phase1.sh diff --git a/scripts/phase1.sh b/scripts/phase1.sh new file mode 100755 index 000000000..9932f15b2 --- /dev/null +++ b/scripts/phase1.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x phase1.sh +# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps + +echo "Zug Zug" + +# 2 push new release to primary cocoapod +echo "2 push new release to primary Cocoapod" +pod trunk push SmartDeviceLink.podspec --allow-warnings + +# 3 Push the new release to the secondary cocoapod using command line: +echo "3 Push the new release to the secondary cocoapod using command line:" +pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. + +# 4 add binary xcframework archive for manual installation +echo "4 add binary xcframework archive for manual installation" +# i +echo "4.i" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO + +# ii +echo "4.ii" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO + +# iii +echo "4.iii" +xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' + +echo "Work Complete" \ No newline at end of file -- cgit v1.2.1 From 5a0a93e9a925764444165287f65efd1c3be129f1 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 17 May 2022 15:35:52 -0400 Subject: Revert "Phase 1 script" This reverts commit 40664640530c2de09c49ba9f47051e53dccd1ab8. --- scripts/phase1.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 scripts/phase1.sh diff --git a/scripts/phase1.sh b/scripts/phase1.sh deleted file mode 100755 index 9932f15b2..000000000 --- a/scripts/phase1.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-17-2022 -# If you don't have permission to run, try: chmod u+x phase1.sh -# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps - -echo "Zug Zug" - -# 2 push new release to primary cocoapod -echo "2 push new release to primary Cocoapod" -pod trunk push SmartDeviceLink.podspec --allow-warnings - -# 3 Push the new release to the secondary cocoapod using command line: -echo "3 Push the new release to the secondary cocoapod using command line:" -pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. - -# 4 add binary xcframework archive for manual installation -echo "4 add binary xcframework archive for manual installation" -# i -echo "4.i" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO - -# ii -echo "4.ii" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO - -# iii -echo "4.iii" -xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' - -echo "Work Complete" \ No newline at end of file -- cgit v1.2.1 From f1843a1e2e2af477ab3a43c2f5d202a1713bb1f2 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 17 May 2022 15:54:49 -0400 Subject: initial script --- scripts/phase1.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 scripts/phase1.sh diff --git a/scripts/phase1.sh b/scripts/phase1.sh new file mode 100755 index 000000000..9932f15b2 --- /dev/null +++ b/scripts/phase1.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x phase1.sh +# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps + +echo "Zug Zug" + +# 2 push new release to primary cocoapod +echo "2 push new release to primary Cocoapod" +pod trunk push SmartDeviceLink.podspec --allow-warnings + +# 3 Push the new release to the secondary cocoapod using command line: +echo "3 Push the new release to the secondary cocoapod using command line:" +pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. + +# 4 add binary xcframework archive for manual installation +echo "4 add binary xcframework archive for manual installation" +# i +echo "4.i" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO + +# ii +echo "4.ii" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO + +# iii +echo "4.iii" +xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' + +echo "Work Complete" \ No newline at end of file -- cgit v1.2.1 From 6428f413f4d9d2087dfd67d47bd47d74b9ac46ec Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 17 May 2022 15:58:43 -0400 Subject: phase 2 and release script --- scripts/Release.sh | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/phase2.sh | 20 ++++++++++++++ 2 files changed, 97 insertions(+) create mode 100755 scripts/Release.sh create mode 100644 scripts/phase2.sh diff --git a/scripts/Release.sh b/scripts/Release.sh new file mode 100755 index 000000000..0c9c720c2 --- /dev/null +++ b/scripts/Release.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x Release.sh + +echo "Start" + +# Phase 2: Script changes build numbers automatically in pbxproj and podspecs + + +# 1 bump version in projectFile +# sed stream edit. It's fast, and can make changes. +bash Phase2.sh + +# 2 update version in podspec +# SmartDeviceLink-iOS.podspec + +# 3 update RPC versions + +# 3 update protocol versions + +# 4 update to newest bson + +# 4 update package.swift + +# 4 update CocoaPods dependancy + +# 5 update changelog + +# 6 Install Jazzy +echo "6 Install Jazzy" +sudo gem install jazzy + +# 6 generate documentation +echo "6 generate documentation" +#bash generate-documentation.sh + +# 7 ensure RPC_SPEC has released to master + +# 7 update the submodule to poitn to new release + +# 8 commit release to develop + +# 8 merge release to master + +# 8 tag it + +# 8 merge master back to develop + + + +# Phase 1: Script runs pod trunk pushes, builds xcframework, builds documentation + + +# 1 Create new release for tag +# ? + +# 1 add highlights of changes +# ? + +bash phase1.sh + +# iv Compress the .xcframework and add the it to the release. +echo "4.iv Compress the .xcframework and add the it to the release." +# SmartDeviceLink.xcframework + +# 5 add docset to release (docs/docsets/) +# ? + +# 6 rename docset similar to old releases +# ? + +# 6 rename framework similar to old releases +# ? + +echo "Complete" diff --git a/scripts/phase2.sh b/scripts/phase2.sh new file mode 100644 index 000000000..89e9da67c --- /dev/null +++ b/scripts/phase2.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x phase1.sh +# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps + +echo "zug zug" + +# 1 bump version in projectFile +# sed stream edit. It's fast, and can make changes. +version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) +build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) +echo "Version "$version_number +echo "build "$build_number + +# 2 update version in podspec +# SmartDeviceLink-iOS.podspec + +echo "work complete" \ No newline at end of file -- cgit v1.2.1 From acb1b0667fbf711444d2de73db1747006acd76af Mon Sep 17 00:00:00 2001 From: George Miller Date: Wed, 18 May 2022 11:48:43 -0400 Subject: Phase 2 script Takes user input. Changes version and build in project file. Changes version in podspec. Note that this changes all instances of the version in the project file. This might not be correct. More development needed. --- scripts/phase2.sh | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 6 deletions(-) mode change 100644 => 100755 scripts/phase2.sh diff --git a/scripts/phase2.sh b/scripts/phase2.sh old mode 100644 new mode 100755 index 89e9da67c..19a9cb42d --- a/scripts/phase2.sh +++ b/scripts/phase2.sh @@ -3,18 +3,90 @@ # George Miller # 05-17-2022 # If you don't have permission to run, try: chmod u+x phase1.sh -# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps + +clear echo "zug zug" +# 0 do some directory shenanigans to get us to the correct working directory. +echo $PWD +if [[ $PWD == *"scripts" ]]; then + cd .. +fi + # 1 bump version in projectFile -# sed stream edit. It's fast, and can make changes. -version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) -build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) -echo "Version "$version_number -echo "build "$build_number +echo +echo "Step 1: Update version in Project File" + +# 1.1) get the current version and build from the podspec file +ProjFile=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj +NewFile=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj +Current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) +Current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) +echo "Current Version "$Current_version_number +echo "Current Build "$Current_build_number + +# 1.2) prompt user for new version +echo "New Version?" +read NewVersionNumber +echo "New Build?" +read NewBuildNumber + +# 1.3) if not blank, or not the same +if [ -z $NewVersionNumber ]; then + echo No file change needed for version +else + if [ $Current_version_number != $NewVersionNumber ]; then + echo make the change + # 1.4) swap new version in to file + sed '/MARKETING_VERSION/{s/'$Current_version_number'/'$NewVersionNumber'/;}' $ProjFile > $NewFile + mv -f $NewFile $ProjFile + else + echo No file change needed for version + fi +fi +if [ -z $NewBuildNumber ]; then + echo No file change needed for build +else + if [ $Current_build_number != $NewBuildNumber ]; then + echo make the change + # 1.4) swap new version in to file + sed '/CURRENT_PROJECT_VERSION/{s/'$Current_build_number'/'$NewBuildNumber'/;}' $ProjFile > $NewFile + mv -f $NewFile $ProjFile + else + echo No file change needed for build + fi +fi + # 2 update version in podspec # SmartDeviceLink-iOS.podspec +echo +echo "Step 2: Update version in podspec File" + +# 2.1) get the current version from the podspec file +PodSpecFile=SmartDeviceLink-iOS.podspec +PodSpecNewFile=NewFile.podspec +CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $PodSpecFile) +echo "Current Version="$CurrentVersion + +# 2.2) prompt user for new version +echo "New Version?" +read NewVersion + +# 2.3) if not blank, or not the same +if [ -z $NewVersion ]; then + echo No file change needed +else + if [ $CurrentVersion != $NewVersion ]; then + echo make the change + # 2.4) swap new version in to file + sed '/s.version/{s/'$CurrentVersion'/'$NewVersion'/;}' $PodSpecFile > $PodSpecNewFile + mv -f $PodSpecNewFile $PodSpecFile + else + echo No file change needed for version + fi +fi + echo "work complete" \ No newline at end of file -- cgit v1.2.1 From 9468962f69764b9460c533be6532bce6d3b2831a Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 09:47:27 -0400 Subject: Setting up for phase 3 --- scripts/Release.sh | 29 +++++++++++++++++++++-------- scripts/phase3.sh | 6 ++++++ 2 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 scripts/phase3.sh diff --git a/scripts/Release.sh b/scripts/Release.sh index 0c9c720c2..6c7d0c30a 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -8,25 +8,32 @@ echo "Start" # Phase 2: Script changes build numbers automatically in pbxproj and podspecs +# probably need to pull latest from before doing any of this # 1 bump version in projectFile -# sed stream edit. It's fast, and can make changes. -bash Phase2.sh - # 2 update version in podspec # SmartDeviceLink-iOS.podspec +bash Phase2.sh + + # 3 update RPC versions +# file? # 3 update protocol versions +# file? # 4 update to newest bson +# file? # 4 update package.swift +# ? # 4 update CocoaPods dependancy +# ? # 5 update changelog +# ? # 6 Install Jazzy echo "6 Install Jazzy" @@ -38,29 +45,35 @@ echo "6 generate documentation" # 7 ensure RPC_SPEC has released to master -# 7 update the submodule to poitn to new release +# 7 update the submodule to point to new release -# 8 commit release to develop +# git commands +# 8 commit release to develop # 8 merge release to master - # 8 tag it - # 8 merge master back to develop # Phase 1: Script runs pod trunk pushes, builds xcframework, builds documentation - # 1 Create new release for tag # ? # 1 add highlights of changes # ? + +# 2 push new release to primary cocoapod +# 3 Push the new release to the secondary cocoapod using command line: +# 4 add binary xcframework archive for manual installation +# i +# ii +# iii bash phase1.sh + # iv Compress the .xcframework and add the it to the release. echo "4.iv Compress the .xcframework and add the it to the release." # SmartDeviceLink.xcframework diff --git a/scripts/phase3.sh b/scripts/phase3.sh new file mode 100644 index 000000000..6d861eba0 --- /dev/null +++ b/scripts/phase3.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# George Miller +# 05-18-2022 + +# I need to figure out some git commands \ No newline at end of file -- cgit v1.2.1 From ca03740ea062c0cd0441b44faf1908efc65e74ff Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 10:01:53 -0400 Subject: Release script with combined phases --- scripts/Release.sh | 118 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 107 insertions(+), 11 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 6c7d0c30a..2fa13da24 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -3,18 +3,91 @@ # George Miller # 05-17-2022 # If you don't have permission to run, try: chmod u+x Release.sh +# numbering follows this document: https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps +# The numbering does restart halfway because the document does. -echo "Start" +# script start +echo "Zug Zug" -# Phase 2: Script changes build numbers automatically in pbxproj and podspecs - -# probably need to pull latest from before doing any of this +# do some directory shenanigans to get us to the correct working directory. +echo $PWD +if [[ $PWD == *"scripts" ]]; then + cd .. +fi # 1 bump version in projectFile +echo +echo "Step 1: Update version in Project File" + +# 1.1) get the current version and build from the podspec file +ProjFile=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj +NewFile=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj +Current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) +Current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) +echo "Current Version "$Current_version_number +echo "Current Build "$Current_build_number + +# 1.2) prompt user for new version +echo "New Version?" +read NewVersionNumber +echo "New Build?" +read NewBuildNumber + +# 1.3) if not blank, or not the same +if [ -z $NewVersionNumber ]; then + echo No file change needed for version +else + if [ $Current_version_number != $NewVersionNumber ]; then + echo make the change + # 1.4) swap new version in to file + sed '/MARKETING_VERSION/{s/'$Current_version_number'/'$NewVersionNumber'/;}' $ProjFile > $NewFile + mv -f $NewFile $ProjFile + else + echo No file change needed for version + fi +fi +if [ -z $NewBuildNumber ]; then + echo No file change needed for build +else + if [ $Current_build_number != $NewBuildNumber ]; then + echo make the change + # 1.4) swap new version in to file + sed '/CURRENT_PROJECT_VERSION/{s/'$Current_build_number'/'$NewBuildNumber'/;}' $ProjFile > $NewFile + mv -f $NewFile $ProjFile + else + echo No file change needed for build + fi +fi + + # 2 update version in podspec # SmartDeviceLink-iOS.podspec -bash Phase2.sh - +echo +echo "Step 2: Update version in podspec File" + +# 2.1) get the current version from the podspec file +PodSpecFile=SmartDeviceLink-iOS.podspec +PodSpecNewFile=NewFile.podspec +CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $PodSpecFile) +echo "Current Version="$CurrentVersion + +# 2.2) prompt user for new version +echo "New Version?" +read NewVersion + +# 2.3) if not blank, or not the same +if [ -z $NewVersion ]; then + echo No file change needed +else + if [ $CurrentVersion != $NewVersion ]; then + echo make the change + # 2.4) swap new version in to file + sed '/s.version/{s/'$CurrentVersion'/'$NewVersion'/;}' $PodSpecFile > $PodSpecNewFile + mv -f $PodSpecNewFile $PodSpecFile + else + echo No file change needed for version + fi +fi # 3 update RPC versions @@ -43,6 +116,7 @@ sudo gem install jazzy echo "6 generate documentation" #bash generate-documentation.sh + # 7 ensure RPC_SPEC has released to master # 7 update the submodule to point to new release @@ -50,13 +124,21 @@ echo "6 generate documentation" # git commands # 8 commit release to develop +# git checkout +# git add -A +# git commit -m +# git push --set-upstream origin + # 8 merge release to master +# git merge + # 8 tag it -# 8 merge master back to develop +# git tag +# 8 merge master back to develop +# git merge -# Phase 1: Script runs pod trunk pushes, builds xcframework, builds documentation # 1 Create new release for tag # ? @@ -66,13 +148,26 @@ echo "6 generate documentation" # 2 push new release to primary cocoapod +echo "2 push new release to primary Cocoapod" +#pod trunk push SmartDeviceLink.podspec --allow-warnings + # 3 Push the new release to the secondary cocoapod using command line: +echo "3 Push the new release to the secondary cocoapod using command line:" +#pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. + # 4 add binary xcframework archive for manual installation +echo "4 add binary xcframework archive for manual installation" # i +echo "4.i" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO + # ii -# iii -bash phase1.sh +echo "4.ii" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO +# iii +echo "4.iii" +xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' # iv Compress the .xcframework and add the it to the release. echo "4.iv Compress the .xcframework and add the it to the release." @@ -87,4 +182,5 @@ echo "4.iv Compress the .xcframework and add the it to the release." # 6 rename framework similar to old releases # ? -echo "Complete" +# script end +echo "Work Complete" -- cgit v1.2.1 From d0ccc386862a4702c8f53a207101c69dc848bc6d Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 10:02:38 -0400 Subject: Removing phase scripts Code from these is not in Release.sh --- scripts/phase1.sh | 32 ------------------- scripts/phase2.sh | 92 ------------------------------------------------------- scripts/phase3.sh | 6 ---- 3 files changed, 130 deletions(-) delete mode 100755 scripts/phase1.sh delete mode 100755 scripts/phase2.sh delete mode 100644 scripts/phase3.sh diff --git a/scripts/phase1.sh b/scripts/phase1.sh deleted file mode 100755 index 9932f15b2..000000000 --- a/scripts/phase1.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-17-2022 -# If you don't have permission to run, try: chmod u+x phase1.sh -# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps - -echo "Zug Zug" - -# 2 push new release to primary cocoapod -echo "2 push new release to primary Cocoapod" -pod trunk push SmartDeviceLink.podspec --allow-warnings - -# 3 Push the new release to the secondary cocoapod using command line: -echo "3 Push the new release to the secondary cocoapod using command line:" -pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. - -# 4 add binary xcframework archive for manual installation -echo "4 add binary xcframework archive for manual installation" -# i -echo "4.i" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO - -# ii -echo "4.ii" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO - -# iii -echo "4.iii" -xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' - -echo "Work Complete" \ No newline at end of file diff --git a/scripts/phase2.sh b/scripts/phase2.sh deleted file mode 100755 index 19a9cb42d..000000000 --- a/scripts/phase2.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-17-2022 -# If you don't have permission to run, try: chmod u+x phase1.sh - -clear - -echo "zug zug" - -# 0 do some directory shenanigans to get us to the correct working directory. -echo $PWD -if [[ $PWD == *"scripts" ]]; then - cd .. -fi - -# 1 bump version in projectFile -echo -echo "Step 1: Update version in Project File" - -# 1.1) get the current version and build from the podspec file -ProjFile=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj -NewFile=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj -Current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) -Current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) -echo "Current Version "$Current_version_number -echo "Current Build "$Current_build_number - -# 1.2) prompt user for new version -echo "New Version?" -read NewVersionNumber -echo "New Build?" -read NewBuildNumber - -# 1.3) if not blank, or not the same -if [ -z $NewVersionNumber ]; then - echo No file change needed for version -else - if [ $Current_version_number != $NewVersionNumber ]; then - echo make the change - # 1.4) swap new version in to file - sed '/MARKETING_VERSION/{s/'$Current_version_number'/'$NewVersionNumber'/;}' $ProjFile > $NewFile - mv -f $NewFile $ProjFile - else - echo No file change needed for version - fi -fi -if [ -z $NewBuildNumber ]; then - echo No file change needed for build -else - if [ $Current_build_number != $NewBuildNumber ]; then - echo make the change - # 1.4) swap new version in to file - sed '/CURRENT_PROJECT_VERSION/{s/'$Current_build_number'/'$NewBuildNumber'/;}' $ProjFile > $NewFile - mv -f $NewFile $ProjFile - else - echo No file change needed for build - fi -fi - - -# 2 update version in podspec -# SmartDeviceLink-iOS.podspec - -echo -echo "Step 2: Update version in podspec File" - -# 2.1) get the current version from the podspec file -PodSpecFile=SmartDeviceLink-iOS.podspec -PodSpecNewFile=NewFile.podspec -CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $PodSpecFile) -echo "Current Version="$CurrentVersion - -# 2.2) prompt user for new version -echo "New Version?" -read NewVersion - -# 2.3) if not blank, or not the same -if [ -z $NewVersion ]; then - echo No file change needed -else - if [ $CurrentVersion != $NewVersion ]; then - echo make the change - # 2.4) swap new version in to file - sed '/s.version/{s/'$CurrentVersion'/'$NewVersion'/;}' $PodSpecFile > $PodSpecNewFile - mv -f $PodSpecNewFile $PodSpecFile - else - echo No file change needed for version - fi -fi - -echo "work complete" \ No newline at end of file diff --git a/scripts/phase3.sh b/scripts/phase3.sh deleted file mode 100644 index 6d861eba0..000000000 --- a/scripts/phase3.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-18-2022 - -# I need to figure out some git commands \ No newline at end of file -- cgit v1.2.1 From 92488f592d7fe6b013473fbcae294a366a030e62 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 10:50:28 -0400 Subject: removing phase scripts --- scripts/Phase2.sh | 19 ------------------- scripts/phase1.sh | 32 -------------------------------- 2 files changed, 51 deletions(-) delete mode 100644 scripts/Phase2.sh delete mode 100755 scripts/phase1.sh diff --git a/scripts/Phase2.sh b/scripts/Phase2.sh deleted file mode 100644 index 9d5f64ff3..000000000 --- a/scripts/Phase2.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-17-2022 -# If you don't have permission to run, try: chmod u+x phase1.sh -# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps - -echo "Hello World" - -# 1 bump version in projectFile -# sed stream edit. It's fast, and can make changes. -version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) -build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' ./SmartDeviceLink-iOS.xcodeproj/project.pbxproj) -echo "Version "$version_number -echo "build "$build_number - -# 2 update version in podspec -# SmartDeviceLink-iOS.podspec - diff --git a/scripts/phase1.sh b/scripts/phase1.sh deleted file mode 100755 index 9932f15b2..000000000 --- a/scripts/phase1.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-17-2022 -# If you don't have permission to run, try: chmod u+x phase1.sh -# numbering in comments is per https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps - -echo "Zug Zug" - -# 2 push new release to primary cocoapod -echo "2 push new release to primary Cocoapod" -pod trunk push SmartDeviceLink.podspec --allow-warnings - -# 3 Push the new release to the secondary cocoapod using command line: -echo "3 Push the new release to the secondary cocoapod using command line:" -pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. - -# 4 add binary xcframework archive for manual installation -echo "4 add binary xcframework archive for manual installation" -# i -echo "4.i" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO - -# ii -echo "4.ii" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO - -# iii -echo "4.iii" -xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' - -echo "Work Complete" \ No newline at end of file -- cgit v1.2.1 From de49c82d818cd92b34d0ef9e58699aa4bbb29ca7 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 16:15:30 -0400 Subject: Apply suggestions from code review Co-authored-by: Joel Fischer --- scripts/Release.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 2fa13da24..2c689c754 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -28,17 +28,17 @@ echo "Current Version "$Current_version_number echo "Current Build "$Current_build_number # 1.2) prompt user for new version -echo "New Version?" +echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " read NewVersionNumber echo "New Build?" read NewBuildNumber # 1.3) if not blank, or not the same if [ -z $NewVersionNumber ]; then - echo No file change needed for version + echo "No version number entered. Skipping..." else if [ $Current_version_number != $NewVersionNumber ]; then - echo make the change + echo "Changed Version Number" # 1.4) swap new version in to file sed '/MARKETING_VERSION/{s/'$Current_version_number'/'$NewVersionNumber'/;}' $ProjFile > $NewFile mv -f $NewFile $ProjFile @@ -156,7 +156,7 @@ echo "3 Push the new release to the secondary cocoapod using command line:" #pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. # 4 add binary xcframework archive for manual installation -echo "4 add binary xcframework archive for manual installation" +echo "Creating .xcframework for manual installation, to be added to the release." # i echo "4.i" xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO -- cgit v1.2.1 From b2124eee3d765ef402e0630c24886c0e6151b767 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 16:50:57 -0400 Subject: Mostly notes Some changes from the review, but mostly notes about future work in this file. --- scripts/Release.sh | 142 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 61 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 2c689c754..78dd88f36 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -8,9 +8,10 @@ # script start echo "Zug Zug" +# echo "Starting SDL release script..." # do some directory shenanigans to get us to the correct working directory. -echo $PWD +# echo $PWD #debug if [[ $PWD == *"scripts" ]]; then cd .. fi @@ -20,42 +21,46 @@ echo echo "Step 1: Update version in Project File" # 1.1) get the current version and build from the podspec file -ProjFile=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj -NewFile=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj -Current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) -Current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ProjFile) -echo "Current Version "$Current_version_number -echo "Current Build "$Current_build_number +project_file=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj +new_file=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj +current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) +current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) +echo "Current Version "$current_version_number +echo "Current Build "$current_build_number # 1.2) prompt user for new version echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " -read NewVersionNumber -echo "New Build?" -read NewBuildNumber +read new_version_number # 1.3) if not blank, or not the same -if [ -z $NewVersionNumber ]; then +if [ -z $new_version_number ]; then echo "No version number entered. Skipping..." else - if [ $Current_version_number != $NewVersionNumber ]; then + if [ $current_version_number != $NewVersinew_version_numberonNumber ]; then echo "Changed Version Number" # 1.4) swap new version in to file - sed '/MARKETING_VERSION/{s/'$Current_version_number'/'$NewVersionNumber'/;}' $ProjFile > $NewFile - mv -f $NewFile $ProjFile + sed '/MARKETING_VERSION/{s/'$current_version_number'/'$new_version_number'/;}' $project_file > $new_file + mv -f $new_file $project_file else - echo No file change needed for version + echo "No project file change needed for version" fi fi -if [ -z $NewBuildNumber ]; then - echo No file change needed for build + +# in the event that the build number somehow is not what it shoudl be, we have code to fix it. +#echo "New Build?" +#read new_build_number +# per review, the new build number will always be 1 +new_build_number=1 +if [ -z $new_build_number ]; then + #echo "No project file change needed for build" else - if [ $Current_build_number != $NewBuildNumber ]; then + if [ $current_build_number != $new_build_number ]; then echo make the change # 1.4) swap new version in to file - sed '/CURRENT_PROJECT_VERSION/{s/'$Current_build_number'/'$NewBuildNumber'/;}' $ProjFile > $NewFile - mv -f $NewFile $ProjFile + sed '/CURRENT_PROJECT_VERSION/{s/'$current_build_number'/'$new_build_number'/;}' $project_file > $new_file + mv -f $new_file $project_file else - echo No file change needed for build + #echo "No project file change needed for build" fi fi @@ -72,79 +77,92 @@ CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:] echo "Current Version="$CurrentVersion # 2.2) prompt user for new version -echo "New Version?" -read NewVersion - -# 2.3) if not blank, or not the same -if [ -z $NewVersion ]; then - echo No file change needed +#echo "New Version?" +#read new_version +# per review, the new version should be the same as above, but we should check with the user. +echo "Enter the new version number for podfile (semantic versioning x.x.x format) or blank to set to match project file ("$new_version_number"): " +read new_version + +# 2.3) If blank, use new version number from above. If new version is different from current, change it. +if [ -z $new_version ]; then + new_version=$new_version_number else - if [ $CurrentVersion != $NewVersion ]; then - echo make the change - # 2.4) swap new version in to file - sed '/s.version/{s/'$CurrentVersion'/'$NewVersion'/;}' $PodSpecFile > $PodSpecNewFile - mv -f $PodSpecNewFile $PodSpecFile - else - echo No file change needed for version - fi +fi +if [ $CurrentVersion != $new_version ]; then + echo make the change + # 2.4) swap new version in to file + sed '/s.version/{s/'$CurrentVersion'/'$new_version'/;}' $PodSpecFile > $PodSpecNewFile + mv -f $PodSpecNewFile $PodSpecFile +else + #echo "No pod file change needed for version" fi # 3 update RPC versions -# file? +# SDLGlobals.h +# TODO # 3 update protocol versions -# file? +# SDLGlobals.h +# TODO # 4 update to newest bson -# file? +# git submodule ... commands +# TODO -# 4 update package.swift -# ? - -# 4 update CocoaPods dependancy -# ? +# Update Package.swift and CocoaPods dependency files to point to latest if necessary. # 5 update changelog -# ? +# TODO - prompt user to make changes to this file: +# Changelog.md # 6 Install Jazzy +# we may want to check if Jazzy is already installed, and only run this if not. TBD echo "6 Install Jazzy" sudo gem install jazzy # 6 generate documentation echo "6 generate documentation" -#bash generate-documentation.sh +# TODO - prompt user to ask if they want to do this. +# bash generate-documentation.sh +# TODO - before bringing code over, evaluate what code does and make sure it will work here. That code already does the cd .. + # 7 ensure RPC_SPEC has released to master +# TODO - prompt user to do this. +# maybe provide links to assist? # 7 update the submodule to point to new release +# TODO - prompt user to do this and wait for confirmation -# git commands -# 8 commit release to develop -# git checkout -# git add -A -# git commit -m -# git push --set-upstream origin +# TODO - prompt the user for this. +# and every step of this process, the user needs complete control. +# that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. -# 8 merge release to master -# git merge + # git commands + # 8 commit release to develop + # git checkout + # git add -A + # git commit -m + # git push --set-upstream origin -# 8 tag it -# git tag + # 8 merge release to master + # git merge -# 8 merge master back to develop -# git merge + # 8 tag it + # git tag + # 8 merge master back to develop + # git merge -# 1 Create new release for tag -# ? + # 1 Create new release for tag + # ? -# 1 add highlights of changes -# ? + # 1 add highlights of changes + # ? # 2 push new release to primary cocoapod @@ -172,6 +190,7 @@ xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Pr # iv Compress the .xcframework and add the it to the release. echo "4.iv Compress the .xcframework and add the it to the release." # SmartDeviceLink.xcframework +# TODO - Zip the .xcframework and name it based on the naming scheme in the releases. Then delete the old intermediate files. # 5 add docset to release (docs/docsets/) # ? @@ -184,3 +203,4 @@ echo "4.iv Compress the .xcframework and add the it to the release." # script end echo "Work Complete" +# echo "Release complete. Time to party 🍾" \ No newline at end of file -- cgit v1.2.1 From a0343e48a68a86f7c4d5e2bf11393ef4e4c99005 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 19 May 2022 17:18:05 -0400 Subject: Updates to comments. --- scripts/Release.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 78dd88f36..2d8295ad1 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -36,7 +36,7 @@ read new_version_number if [ -z $new_version_number ]; then echo "No version number entered. Skipping..." else - if [ $current_version_number != $NewVersinew_version_numberonNumber ]; then + if [ $current_version_number != $new_version_number ]; then echo "Changed Version Number" # 1.4) swap new version in to file sed '/MARKETING_VERSION/{s/'$current_version_number'/'$new_version_number'/;}' $project_file > $new_file @@ -52,7 +52,7 @@ fi # per review, the new build number will always be 1 new_build_number=1 if [ -z $new_build_number ]; then - #echo "No project file change needed for build" + echo "No project file change needed for build number" else if [ $current_build_number != $new_build_number ]; then echo make the change @@ -60,7 +60,7 @@ else sed '/CURRENT_PROJECT_VERSION/{s/'$current_build_number'/'$new_build_number'/;}' $project_file > $new_file mv -f $new_file $project_file else - #echo "No project file change needed for build" + echo "No project file change needed for build number" fi fi @@ -86,15 +86,12 @@ read new_version # 2.3) If blank, use new version number from above. If new version is different from current, change it. if [ -z $new_version ]; then new_version=$new_version_number -else fi if [ $CurrentVersion != $new_version ]; then echo make the change # 2.4) swap new version in to file sed '/s.version/{s/'$CurrentVersion'/'$new_version'/;}' $PodSpecFile > $PodSpecNewFile mv -f $PodSpecNewFile $PodSpecFile -else - #echo "No pod file change needed for version" fi @@ -117,9 +114,9 @@ fi # Changelog.md # 6 Install Jazzy -# we may want to check if Jazzy is already installed, and only run this if not. TBD +# TODO - we may want to check if Jazzy is already installed, and only run this if not. echo "6 Install Jazzy" -sudo gem install jazzy +#sudo gem install jazzy # 6 generate documentation echo "6 generate documentation" -- cgit v1.2.1 From 4f028f8c5e4fac964e8ae5eeb8d8f9bf15743dfe Mon Sep 17 00:00:00 2001 From: George Miller Date: Fri, 20 May 2022 14:02:26 -0400 Subject: Periodic I haven't done a commit in a while and I have touched a lot of things. --- scripts/Release.sh | 128 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 80 insertions(+), 48 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 2d8295ad1..2db087247 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -7,14 +7,20 @@ # The numbering does restart halfway because the document does. # script start -echo "Zug Zug" -# echo "Starting SDL release script..." +echo +#echo "Zug Zug" +echo "Starting SDL release script..." -# do some directory shenanigans to get us to the correct working directory. -# echo $PWD #debug +# If we are running from the scripts directory, we want to pop back to the project root to do everything. if [[ $PWD == *"scripts" ]]; then cd .. fi +# If, for soem reason, we are not now in the correct working directory, exit +if [[ $PWD != *"sdl_ios" ]]; then + echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" + exit 0 +fi + # 1 bump version in projectFile echo @@ -46,7 +52,7 @@ else fi fi -# in the event that the build number somehow is not what it shoudl be, we have code to fix it. +# in the event that the build number somehow is not what it should be, we have code to fix it. #echo "New Build?" #read new_build_number # per review, the new build number will always be 1 @@ -96,71 +102,95 @@ fi # 3 update RPC versions -# SDLGlobals.h -# TODO +# /SmartDeviceLink/private/SDLGlobals.h +# TODO - extract version, prompt user to fix it if necessary. +echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" # 3 update protocol versions -# SDLGlobals.h -# TODO +# /SmartDeviceLink/private/SDLGlobals.h +# TODO - extract version, prompt user to fix it if necessary. +echo "Step 3: Please update protocol versions in /SmartDeviceLink/private/SDLGlobals.h" # 4 update to newest bson # git submodule ... commands -# TODO - -# Update Package.swift and CocoaPods dependency files to point to latest if necessary. +# 4.1 Update Package.swift and CocoaPods dependency files to point to latest if necessary. +# TODO - what needs to be done for this? # 5 update changelog -# TODO - prompt user to make changes to this file: +# IDEA - I should record the timestamp of the changelog, and then check after the user returns to see that they did touch the file. +# IDEA - we could also insert a template into the changelog that includes the version the users have selected above. +echo +echo "Please go update Changelog.md, then return here and press enter." +read user_input # Changelog.md -# 6 Install Jazzy -# TODO - we may want to check if Jazzy is already installed, and only run this if not. -echo "6 Install Jazzy" -#sudo gem install jazzy - # 6 generate documentation echo "6 generate documentation" -# TODO - prompt user to ask if they want to do this. -# bash generate-documentation.sh -# TODO - before bringing code over, evaluate what code does and make sure it will work here. That code already does the cd .. - +echo "Would you like to automatically generate documentation with Jazzy (Y/n)?" +read user_input +if [[ ! $user_input == [Nn] ]]; then + # 6 Install Jazzy + # Check if Jazzy is already installed, and if not then install jazzy + echo "Check if Jazzy is already installed, and install if necessary (may require password)" + if [ -z "$(mdfind -name 'Jazzy')" ]; then + echo "6 Install Jazzy" + sudo gem install jazzy + fi + # this runs Jazzy to generate the documentation + echo "Run Jazzy to generate documentation" + jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs +#then +# echo "not Jazzy..." +fi # 7 ensure RPC_SPEC has released to master -# TODO - prompt user to do this. -# maybe provide links to assist? +echo "Step 7: ensure RPC_SPEC has released to master" +# TODO - cleanup wording +# IDEA - maybe provide links to assist? +echo "Please ensure RPC_SPEC has released to master and return here" +read user_input # 7 update the submodule to point to new release -# TODO - prompt user to do this and wait for confirmation +#echo "update the submodule to point to new release" +# TODO - cleanup wording +# IDEA - maybe provide links to assist? +echo "Please update the submodule to point to new release and return here" +read user_input -# TODO - prompt the user for this. +echo "Please perform the following steps" # and every step of this process, the user needs complete control. # that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. - # git commands - # 8 commit release to develop - # git checkout - # git add -A - # git commit -m - # git push --set-upstream origin - - # 8 merge release to master - # git merge - - # 8 tag it - # git tag - - # 8 merge master back to develop - # git merge - - - # 1 Create new release for tag - # ? - - # 1 add highlights of changes - # ? +# git commands +#todo - I don't like any of how this section is handled. +# 8 commit release to develop +echo "step 8: commit release to develop" +# git checkout +# git add -A +# git commit -m +# git push --set-upstream origin + +# 8 merge release to master +echo "8.1 merge release to master" +# git merge + +# 8 tag it +echo "8.2 tag the release" +# git tag + +# 8 merge master back to develop +echo "8.3 merge master back to develop" +# git merge + +# 1 Create new release for tag +echo "1.0 Create new release for tag" +# ? +# 1 add highlights of changes +echo "1.1 add highlights of changes" +# ? # 2 push new release to primary cocoapod echo "2 push new release to primary Cocoapod" @@ -169,6 +199,7 @@ echo "2 push new release to primary Cocoapod" # 3 Push the new release to the secondary cocoapod using command line: echo "3 Push the new release to the secondary cocoapod using command line:" #pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. +read user_input # 4 add binary xcframework archive for manual installation echo "Creating .xcframework for manual installation, to be added to the release." @@ -189,6 +220,7 @@ echo "4.iv Compress the .xcframework and add the it to the release." # SmartDeviceLink.xcframework # TODO - Zip the .xcframework and name it based on the naming scheme in the releases. Then delete the old intermediate files. + # 5 add docset to release (docs/docsets/) # ? -- cgit v1.2.1 From 5abb529f726ecb0070f45d2a37afafece96ea579 Mon Sep 17 00:00:00 2001 From: George Miller Date: Fri, 20 May 2022 15:10:05 -0400 Subject: pre test commit --- scripts/Release.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 2db087247..2cafcca29 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -43,7 +43,7 @@ if [ -z $new_version_number ]; then echo "No version number entered. Skipping..." else if [ $current_version_number != $new_version_number ]; then - echo "Changed Version Number" + echo "Changing Version Number in $project_file" # 1.4) swap new version in to file sed '/MARKETING_VERSION/{s/'$current_version_number'/'$new_version_number'/;}' $project_file > $new_file mv -f $new_file $project_file @@ -104,11 +104,13 @@ fi # 3 update RPC versions # /SmartDeviceLink/private/SDLGlobals.h # TODO - extract version, prompt user to fix it if necessary. +echo echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" # 3 update protocol versions # /SmartDeviceLink/private/SDLGlobals.h # TODO - extract version, prompt user to fix it if necessary. +echo echo "Step 3: Please update protocol versions in /SmartDeviceLink/private/SDLGlobals.h" # 4 update to newest bson @@ -125,6 +127,7 @@ read user_input # Changelog.md # 6 generate documentation +echo echo "6 generate documentation" echo "Would you like to automatically generate documentation with Jazzy (Y/n)?" read user_input @@ -145,6 +148,7 @@ if [[ ! $user_input == [Nn] ]]; then fi # 7 ensure RPC_SPEC has released to master +echo echo "Step 7: ensure RPC_SPEC has released to master" # TODO - cleanup wording # IDEA - maybe provide links to assist? @@ -155,10 +159,12 @@ read user_input #echo "update the submodule to point to new release" # TODO - cleanup wording # IDEA - maybe provide links to assist? +echo echo "Please update the submodule to point to new release and return here" read user_input +echo echo "Please perform the following steps" # and every step of this process, the user needs complete control. # that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. @@ -202,6 +208,7 @@ echo "3 Push the new release to the secondary cocoapod using command line:" read user_input # 4 add binary xcframework archive for manual installation +echo echo "Creating .xcframework for manual installation, to be added to the release." # i echo "4.i" @@ -216,20 +223,27 @@ echo "4.iii" xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' # iv Compress the .xcframework and add the it to the release. +echo echo "4.iv Compress the .xcframework and add the it to the release." # SmartDeviceLink.xcframework -# TODO - Zip the .xcframework and name it based on the naming scheme in the releases. Then delete the old intermediate files. - +file="SmartDeviceLink.xcframework" +zip_file_name="SmartDeviceLink.xcframework.zip" +if [ ! -f "$zip_file_name" ]; then + rm $zip_file_name +fi +zip $zip_file_name $file +#TODO - add framework to release # 5 add docset to release (docs/docsets/) -# ? +# TODO - ? # 6 rename docset similar to old releases -# ? +# TODO - ? # 6 rename framework similar to old releases -# ? +# TODO - ? # script end +echo echo "Work Complete" # echo "Release complete. Time to party 🍾" \ No newline at end of file -- cgit v1.2.1 From 0fee3d07b2676b4f293b79a78262fc4205c04dc3 Mon Sep 17 00:00:00 2001 From: George Miller Date: Fri, 20 May 2022 16:01:18 -0400 Subject: tested I have run a full test and it does work without errors. Still lots to do. Let's review and decided what is next. --- scripts/Release.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/scripts/Release.sh b/scripts/Release.sh index 2cafcca29..5a113883a 100755 --- a/scripts/Release.sh +++ b/scripts/Release.sh @@ -94,7 +94,7 @@ if [ -z $new_version ]; then new_version=$new_version_number fi if [ $CurrentVersion != $new_version ]; then - echo make the change + echo "changing version in $PodSpecFile to $new_version" # 2.4) swap new version in to file sed '/s.version/{s/'$CurrentVersion'/'$new_version'/;}' $PodSpecFile > $PodSpecNewFile mv -f $PodSpecNewFile $PodSpecFile @@ -143,7 +143,7 @@ if [[ ! $user_input == [Nn] ]]; then # this runs Jazzy to generate the documentation echo "Run Jazzy to generate documentation" jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs -#then +#else # echo "not Jazzy..." fi @@ -191,7 +191,7 @@ echo "8.3 merge master back to develop" # git merge # 1 Create new release for tag -echo "1.0 Create new release for tag" +echo "Step 1: Create new release for tag" # ? # 1 add highlights of changes @@ -199,17 +199,18 @@ echo "1.1 add highlights of changes" # ? # 2 push new release to primary cocoapod -echo "2 push new release to primary Cocoapod" +echo "Step 2: push new release to primary Cocoapod" #pod trunk push SmartDeviceLink.podspec --allow-warnings # 3 Push the new release to the secondary cocoapod using command line: -echo "3 Push the new release to the secondary cocoapod using command line:" +echo "Step 3: Push the new release to the secondary cocoapod using command line:" #pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. read user_input -# 4 add binary xcframework archive for manual installation +# 4 Add a binary xcframework archive for manual installation with the following commands +# TODO - these commands did not work on last test. echo -echo "Creating .xcframework for manual installation, to be added to the release." +echo "Step 4: Add a binary xcframework archive for manual installation with the following commands" # i echo "4.i" xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO @@ -225,23 +226,28 @@ xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Pr # iv Compress the .xcframework and add the it to the release. echo echo "4.iv Compress the .xcframework and add the it to the release." -# SmartDeviceLink.xcframework file="SmartDeviceLink.xcframework" zip_file_name="SmartDeviceLink.xcframework.zip" if [ ! -f "$zip_file_name" ]; then - rm $zip_file_name + rm $zip_file_name #kill the old zip if present. Useful for re-running the script fi +#TODO - we should verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. zip $zip_file_name $file #TODO - add framework to release + # 5 add docset to release (docs/docsets/) +echo "step 5: Add the docset to the release found in docs/docsets/." # TODO - ? +echo "step 6: Rename the docset and framework similar to older releases" # 6 rename docset similar to old releases -# TODO - ? +# TODO - figure out old/new names +# mv # 6 rename framework similar to old releases -# TODO - ? +# TODO +# mv # script end echo -- cgit v1.2.1 From af551ce53d74321d8f24201136f8a5d087958cce Mon Sep 17 00:00:00 2001 From: George Miller Date: Mon, 23 May 2022 10:17:16 -0400 Subject: Changed name to lower case. --- scripts/Release.sh | 255 ----------------------------------------------------- scripts/release.sh | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 255 insertions(+), 255 deletions(-) delete mode 100755 scripts/Release.sh create mode 100755 scripts/release.sh diff --git a/scripts/Release.sh b/scripts/Release.sh deleted file mode 100755 index 5a113883a..000000000 --- a/scripts/Release.sh +++ /dev/null @@ -1,255 +0,0 @@ -#!/bin/bash - -# George Miller -# 05-17-2022 -# If you don't have permission to run, try: chmod u+x Release.sh -# numbering follows this document: https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps -# The numbering does restart halfway because the document does. - -# script start -echo -#echo "Zug Zug" -echo "Starting SDL release script..." - -# If we are running from the scripts directory, we want to pop back to the project root to do everything. -if [[ $PWD == *"scripts" ]]; then - cd .. -fi -# If, for soem reason, we are not now in the correct working directory, exit -if [[ $PWD != *"sdl_ios" ]]; then - echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" - exit 0 -fi - - -# 1 bump version in projectFile -echo -echo "Step 1: Update version in Project File" - -# 1.1) get the current version and build from the podspec file -project_file=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj -new_file=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj -current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) -current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) -echo "Current Version "$current_version_number -echo "Current Build "$current_build_number - -# 1.2) prompt user for new version -echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " -read new_version_number - -# 1.3) if not blank, or not the same -if [ -z $new_version_number ]; then - echo "No version number entered. Skipping..." -else - if [ $current_version_number != $new_version_number ]; then - echo "Changing Version Number in $project_file" - # 1.4) swap new version in to file - sed '/MARKETING_VERSION/{s/'$current_version_number'/'$new_version_number'/;}' $project_file > $new_file - mv -f $new_file $project_file - else - echo "No project file change needed for version" - fi -fi - -# in the event that the build number somehow is not what it should be, we have code to fix it. -#echo "New Build?" -#read new_build_number -# per review, the new build number will always be 1 -new_build_number=1 -if [ -z $new_build_number ]; then - echo "No project file change needed for build number" -else - if [ $current_build_number != $new_build_number ]; then - echo make the change - # 1.4) swap new version in to file - sed '/CURRENT_PROJECT_VERSION/{s/'$current_build_number'/'$new_build_number'/;}' $project_file > $new_file - mv -f $new_file $project_file - else - echo "No project file change needed for build number" - fi -fi - - -# 2 update version in podspec -# SmartDeviceLink-iOS.podspec -echo -echo "Step 2: Update version in podspec File" - -# 2.1) get the current version from the podspec file -PodSpecFile=SmartDeviceLink-iOS.podspec -PodSpecNewFile=NewFile.podspec -CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $PodSpecFile) -echo "Current Version="$CurrentVersion - -# 2.2) prompt user for new version -#echo "New Version?" -#read new_version -# per review, the new version should be the same as above, but we should check with the user. -echo "Enter the new version number for podfile (semantic versioning x.x.x format) or blank to set to match project file ("$new_version_number"): " -read new_version - -# 2.3) If blank, use new version number from above. If new version is different from current, change it. -if [ -z $new_version ]; then - new_version=$new_version_number -fi -if [ $CurrentVersion != $new_version ]; then - echo "changing version in $PodSpecFile to $new_version" - # 2.4) swap new version in to file - sed '/s.version/{s/'$CurrentVersion'/'$new_version'/;}' $PodSpecFile > $PodSpecNewFile - mv -f $PodSpecNewFile $PodSpecFile -fi - - -# 3 update RPC versions -# /SmartDeviceLink/private/SDLGlobals.h -# TODO - extract version, prompt user to fix it if necessary. -echo -echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" - -# 3 update protocol versions -# /SmartDeviceLink/private/SDLGlobals.h -# TODO - extract version, prompt user to fix it if necessary. -echo -echo "Step 3: Please update protocol versions in /SmartDeviceLink/private/SDLGlobals.h" - -# 4 update to newest bson -# git submodule ... commands -# 4.1 Update Package.swift and CocoaPods dependency files to point to latest if necessary. -# TODO - what needs to be done for this? - -# 5 update changelog -# IDEA - I should record the timestamp of the changelog, and then check after the user returns to see that they did touch the file. -# IDEA - we could also insert a template into the changelog that includes the version the users have selected above. -echo -echo "Please go update Changelog.md, then return here and press enter." -read user_input -# Changelog.md - -# 6 generate documentation -echo -echo "6 generate documentation" -echo "Would you like to automatically generate documentation with Jazzy (Y/n)?" -read user_input -if [[ ! $user_input == [Nn] ]]; then - # 6 Install Jazzy - # Check if Jazzy is already installed, and if not then install jazzy - echo "Check if Jazzy is already installed, and install if necessary (may require password)" - if [ -z "$(mdfind -name 'Jazzy')" ]; then - echo "6 Install Jazzy" - sudo gem install jazzy - fi - - # this runs Jazzy to generate the documentation - echo "Run Jazzy to generate documentation" - jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs -#else -# echo "not Jazzy..." -fi - -# 7 ensure RPC_SPEC has released to master -echo -echo "Step 7: ensure RPC_SPEC has released to master" -# TODO - cleanup wording -# IDEA - maybe provide links to assist? -echo "Please ensure RPC_SPEC has released to master and return here" -read user_input - -# 7 update the submodule to point to new release -#echo "update the submodule to point to new release" -# TODO - cleanup wording -# IDEA - maybe provide links to assist? -echo -echo "Please update the submodule to point to new release and return here" -read user_input - - -echo -echo "Please perform the following steps" -# and every step of this process, the user needs complete control. -# that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. - -# git commands -#todo - I don't like any of how this section is handled. -# 8 commit release to develop -echo "step 8: commit release to develop" -# git checkout -# git add -A -# git commit -m -# git push --set-upstream origin - -# 8 merge release to master -echo "8.1 merge release to master" -# git merge - -# 8 tag it -echo "8.2 tag the release" -# git tag - -# 8 merge master back to develop -echo "8.3 merge master back to develop" -# git merge - -# 1 Create new release for tag -echo "Step 1: Create new release for tag" -# ? - -# 1 add highlights of changes -echo "1.1 add highlights of changes" -# ? - -# 2 push new release to primary cocoapod -echo "Step 2: push new release to primary Cocoapod" -#pod trunk push SmartDeviceLink.podspec --allow-warnings - -# 3 Push the new release to the secondary cocoapod using command line: -echo "Step 3: Push the new release to the secondary cocoapod using command line:" -#pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. -read user_input - -# 4 Add a binary xcframework archive for manual installation with the following commands -# TODO - these commands did not work on last test. -echo -echo "Step 4: Add a binary xcframework archive for manual installation with the following commands" -# i -echo "4.i" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO - -# ii -echo "4.ii" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO - -# iii -echo "4.iii" -xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' - -# iv Compress the .xcframework and add the it to the release. -echo -echo "4.iv Compress the .xcframework and add the it to the release." -file="SmartDeviceLink.xcframework" -zip_file_name="SmartDeviceLink.xcframework.zip" -if [ ! -f "$zip_file_name" ]; then - rm $zip_file_name #kill the old zip if present. Useful for re-running the script -fi -#TODO - we should verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. -zip $zip_file_name $file -#TODO - add framework to release - - -# 5 add docset to release (docs/docsets/) -echo "step 5: Add the docset to the release found in docs/docsets/." -# TODO - ? - -echo "step 6: Rename the docset and framework similar to older releases" -# 6 rename docset similar to old releases -# TODO - figure out old/new names -# mv - -# 6 rename framework similar to old releases -# TODO -# mv - -# script end -echo -echo "Work Complete" -# echo "Release complete. Time to party 🍾" \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 000000000..5a113883a --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,255 @@ +#!/bin/bash + +# George Miller +# 05-17-2022 +# If you don't have permission to run, try: chmod u+x Release.sh +# numbering follows this document: https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps +# The numbering does restart halfway because the document does. + +# script start +echo +#echo "Zug Zug" +echo "Starting SDL release script..." + +# If we are running from the scripts directory, we want to pop back to the project root to do everything. +if [[ $PWD == *"scripts" ]]; then + cd .. +fi +# If, for soem reason, we are not now in the correct working directory, exit +if [[ $PWD != *"sdl_ios" ]]; then + echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" + exit 0 +fi + + +# 1 bump version in projectFile +echo +echo "Step 1: Update version in Project File" + +# 1.1) get the current version and build from the podspec file +project_file=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj +new_file=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj +current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) +current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) +echo "Current Version "$current_version_number +echo "Current Build "$current_build_number + +# 1.2) prompt user for new version +echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " +read new_version_number + +# 1.3) if not blank, or not the same +if [ -z $new_version_number ]; then + echo "No version number entered. Skipping..." +else + if [ $current_version_number != $new_version_number ]; then + echo "Changing Version Number in $project_file" + # 1.4) swap new version in to file + sed '/MARKETING_VERSION/{s/'$current_version_number'/'$new_version_number'/;}' $project_file > $new_file + mv -f $new_file $project_file + else + echo "No project file change needed for version" + fi +fi + +# in the event that the build number somehow is not what it should be, we have code to fix it. +#echo "New Build?" +#read new_build_number +# per review, the new build number will always be 1 +new_build_number=1 +if [ -z $new_build_number ]; then + echo "No project file change needed for build number" +else + if [ $current_build_number != $new_build_number ]; then + echo make the change + # 1.4) swap new version in to file + sed '/CURRENT_PROJECT_VERSION/{s/'$current_build_number'/'$new_build_number'/;}' $project_file > $new_file + mv -f $new_file $project_file + else + echo "No project file change needed for build number" + fi +fi + + +# 2 update version in podspec +# SmartDeviceLink-iOS.podspec +echo +echo "Step 2: Update version in podspec File" + +# 2.1) get the current version from the podspec file +PodSpecFile=SmartDeviceLink-iOS.podspec +PodSpecNewFile=NewFile.podspec +CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $PodSpecFile) +echo "Current Version="$CurrentVersion + +# 2.2) prompt user for new version +#echo "New Version?" +#read new_version +# per review, the new version should be the same as above, but we should check with the user. +echo "Enter the new version number for podfile (semantic versioning x.x.x format) or blank to set to match project file ("$new_version_number"): " +read new_version + +# 2.3) If blank, use new version number from above. If new version is different from current, change it. +if [ -z $new_version ]; then + new_version=$new_version_number +fi +if [ $CurrentVersion != $new_version ]; then + echo "changing version in $PodSpecFile to $new_version" + # 2.4) swap new version in to file + sed '/s.version/{s/'$CurrentVersion'/'$new_version'/;}' $PodSpecFile > $PodSpecNewFile + mv -f $PodSpecNewFile $PodSpecFile +fi + + +# 3 update RPC versions +# /SmartDeviceLink/private/SDLGlobals.h +# TODO - extract version, prompt user to fix it if necessary. +echo +echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" + +# 3 update protocol versions +# /SmartDeviceLink/private/SDLGlobals.h +# TODO - extract version, prompt user to fix it if necessary. +echo +echo "Step 3: Please update protocol versions in /SmartDeviceLink/private/SDLGlobals.h" + +# 4 update to newest bson +# git submodule ... commands +# 4.1 Update Package.swift and CocoaPods dependency files to point to latest if necessary. +# TODO - what needs to be done for this? + +# 5 update changelog +# IDEA - I should record the timestamp of the changelog, and then check after the user returns to see that they did touch the file. +# IDEA - we could also insert a template into the changelog that includes the version the users have selected above. +echo +echo "Please go update Changelog.md, then return here and press enter." +read user_input +# Changelog.md + +# 6 generate documentation +echo +echo "6 generate documentation" +echo "Would you like to automatically generate documentation with Jazzy (Y/n)?" +read user_input +if [[ ! $user_input == [Nn] ]]; then + # 6 Install Jazzy + # Check if Jazzy is already installed, and if not then install jazzy + echo "Check if Jazzy is already installed, and install if necessary (may require password)" + if [ -z "$(mdfind -name 'Jazzy')" ]; then + echo "6 Install Jazzy" + sudo gem install jazzy + fi + + # this runs Jazzy to generate the documentation + echo "Run Jazzy to generate documentation" + jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs +#else +# echo "not Jazzy..." +fi + +# 7 ensure RPC_SPEC has released to master +echo +echo "Step 7: ensure RPC_SPEC has released to master" +# TODO - cleanup wording +# IDEA - maybe provide links to assist? +echo "Please ensure RPC_SPEC has released to master and return here" +read user_input + +# 7 update the submodule to point to new release +#echo "update the submodule to point to new release" +# TODO - cleanup wording +# IDEA - maybe provide links to assist? +echo +echo "Please update the submodule to point to new release and return here" +read user_input + + +echo +echo "Please perform the following steps" +# and every step of this process, the user needs complete control. +# that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. + +# git commands +#todo - I don't like any of how this section is handled. +# 8 commit release to develop +echo "step 8: commit release to develop" +# git checkout +# git add -A +# git commit -m +# git push --set-upstream origin + +# 8 merge release to master +echo "8.1 merge release to master" +# git merge + +# 8 tag it +echo "8.2 tag the release" +# git tag + +# 8 merge master back to develop +echo "8.3 merge master back to develop" +# git merge + +# 1 Create new release for tag +echo "Step 1: Create new release for tag" +# ? + +# 1 add highlights of changes +echo "1.1 add highlights of changes" +# ? + +# 2 push new release to primary cocoapod +echo "Step 2: push new release to primary Cocoapod" +#pod trunk push SmartDeviceLink.podspec --allow-warnings + +# 3 Push the new release to the secondary cocoapod using command line: +echo "Step 3: Push the new release to the secondary cocoapod using command line:" +#pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. +read user_input + +# 4 Add a binary xcframework archive for manual installation with the following commands +# TODO - these commands did not work on last test. +echo +echo "Step 4: Add a binary xcframework archive for manual installation with the following commands" +# i +echo "4.i" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO + +# ii +echo "4.ii" +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO + +# iii +echo "4.iii" +xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' + +# iv Compress the .xcframework and add the it to the release. +echo +echo "4.iv Compress the .xcframework and add the it to the release." +file="SmartDeviceLink.xcframework" +zip_file_name="SmartDeviceLink.xcframework.zip" +if [ ! -f "$zip_file_name" ]; then + rm $zip_file_name #kill the old zip if present. Useful for re-running the script +fi +#TODO - we should verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. +zip $zip_file_name $file +#TODO - add framework to release + + +# 5 add docset to release (docs/docsets/) +echo "step 5: Add the docset to the release found in docs/docsets/." +# TODO - ? + +echo "step 6: Rename the docset and framework similar to older releases" +# 6 rename docset similar to old releases +# TODO - figure out old/new names +# mv + +# 6 rename framework similar to old releases +# TODO +# mv + +# script end +echo +echo "Work Complete" +# echo "Release complete. Time to party 🍾" \ No newline at end of file -- cgit v1.2.1 From e3d922dcc3ac8c69a79a852b7c9a054af14dd43b Mon Sep 17 00:00:00 2001 From: George Miller Date: Mon, 23 May 2022 10:27:49 -0400 Subject: some quick changes to meet review notes --- scripts/release.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 5a113883a..d6c009c48 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -233,7 +233,9 @@ if [ ! -f "$zip_file_name" ]; then fi #TODO - we should verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. zip $zip_file_name $file -#TODO - add framework to release +#TODO - remove old files +# rm $file +#TODO - add framework to release ?? # 5 add docset to release (docs/docsets/) @@ -251,5 +253,6 @@ echo "step 6: Rename the docset and framework similar to older releases" # script end echo -echo "Work Complete" -# echo "Release complete. Time to party 🍾" \ No newline at end of file +#echo "Work Complete" +#echo "Release complete. Time to party 🍾" +echo "Release complete" \ No newline at end of file -- cgit v1.2.1 From c51d50048e2763daa7bb08d61a5119fce5465c93 Mon Sep 17 00:00:00 2001 From: George Miller Date: Mon, 23 May 2022 16:20:30 -0400 Subject: BiSON section Added commands to check dependency version. Only works for a single dependency --- scripts/release.sh | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index d6c009c48..7231f22e8 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -101,22 +101,41 @@ if [ $CurrentVersion != $new_version ]; then fi + # 3 update RPC versions -# /SmartDeviceLink/private/SDLGlobals.h +# /SmartDeviceLink/private/SDLGlobals.m # TODO - extract version, prompt user to fix it if necessary. echo echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" # 3 update protocol versions -# /SmartDeviceLink/private/SDLGlobals.h +# /SmartDeviceLink/private/SDLGlobals.m # TODO - extract version, prompt user to fix it if necessary. echo echo "Step 3: Please update protocol versions in /SmartDeviceLink/private/SDLGlobals.h" -# 4 update to newest bson -# git submodule ... commands -# 4.1 Update Package.swift and CocoaPods dependency files to point to latest if necessary. -# TODO - what needs to be done for this? + +# 4 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. +# extract version and link from Package.swift +submodule_info=$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;p;}' $project_file) +submodule_name=$(jq -n "{$submodule_info}" | jq -r .name) +submodule_url=$(jq -n "{$submodule_info}" | jq -r .url) +submodule_current_version=$(jq -n "{$submodule_info}" | jq -r .from) + +# figure out latest version (visit link?) +submodule_latest_version=$(gh repo view $submodule_url --json latestRelease -q .latestRelease.tagName) + +# compare versions +if [ $submodule_current_version != $submodule_latest_version ]; then + echo + echo "Current version of $submodule_name: "$submodule_current_version + echo "Latest version of $submodule_name: "$submodule_latest_version + echo "Please update the submodule $submodule_name before continuing with the release." + echo + echo "You must also edit the dependancy information in SmartDeviceLink-iOS.podspec" + echo +fi + # 5 update changelog # IDEA - I should record the timestamp of the changelog, and then check after the user returns to see that they did touch the file. @@ -236,10 +255,12 @@ zip $zip_file_name $file #TODO - remove old files # rm $file #TODO - add framework to release ?? +# git add # 5 add docset to release (docs/docsets/) echo "step 5: Add the docset to the release found in docs/docsets/." +# git add # TODO - ? echo "step 6: Rename the docset and framework similar to older releases" @@ -251,8 +272,10 @@ echo "step 6: Rename the docset and framework similar to older releases" # TODO # mv +# TODO - don't we still need to commit/push the framework/docset changes? + # script end echo #echo "Work Complete" #echo "Release complete. Time to party 🍾" -echo "Release complete" \ No newline at end of file +echo "Release complete" -- cgit v1.2.1 From d7a77a08b8dd3db6cbeb1fa0cb2870845a62f5b7 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 24 May 2022 12:12:23 -0400 Subject: zip and rename the docset and framework --- scripts/release.sh | 88 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 7231f22e8..eaa53ed83 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -166,23 +166,17 @@ if [[ ! $user_input == [Nn] ]]; then # echo "not Jazzy..." fi -# 7 ensure RPC_SPEC has released to master -echo -echo "Step 7: ensure RPC_SPEC has released to master" -# TODO - cleanup wording -# IDEA - maybe provide links to assist? -echo "Please ensure RPC_SPEC has released to master and return here" -read user_input - -# 7 update the submodule to point to new release -#echo "update the submodule to point to new release" +# 7 Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). # TODO - cleanup wording # IDEA - maybe provide links to assist? echo -echo "Please update the submodule to point to new release and return here" +echo "Step 7: ensure RPC_SPEC has released to master" +echo "Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring)" +echo "Then return here" read user_input + echo echo "Please perform the following steps" # and every step of this process, the user needs complete control. @@ -208,7 +202,11 @@ echo "8.2 tag the release" # 8 merge master back to develop echo "8.3 merge master back to develop" # git merge +read user_input + +echo +echo "Please perform the following steps" # 1 Create new release for tag echo "Step 1: Create new release for tag" # ? @@ -219,63 +217,83 @@ echo "1.1 add highlights of changes" # 2 push new release to primary cocoapod echo "Step 2: push new release to primary Cocoapod" +echo "pod trunk push SmartDeviceLink.podspec --allow-warnings" #pod trunk push SmartDeviceLink.podspec --allow-warnings # 3 Push the new release to the secondary cocoapod using command line: echo "Step 3: Push the new release to the secondary cocoapod using command line:" +echo "pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings." #pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. read user_input + # 4 Add a binary xcframework archive for manual installation with the following commands -# TODO - these commands did not work on last test. echo -echo "Step 4: Add a binary xcframework archive for manual installation with the following commands" +echo "Step 4: Add a binary xcframework archive for manual installation" # i -echo "4.i" +echo "4.i - Build Device archive" xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO # ii -echo "4.ii" +echo "4.ii - Build Simulator archive" xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO # iii -echo "4.iii" +echo "4.iii - Build framework" xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' # iv Compress the .xcframework and add the it to the release. echo echo "4.iv Compress the .xcframework and add the it to the release." file="SmartDeviceLink.xcframework" -zip_file_name="SmartDeviceLink.xcframework.zip" +zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" #SmartDeviceLink-7.3.1.xcframework.zip if [ ! -f "$zip_file_name" ]; then rm $zip_file_name #kill the old zip if present. Useful for re-running the script fi -#TODO - we should verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. -zip $zip_file_name $file -#TODO - remove old files -# rm $file -#TODO - add framework to release ?? -# git add +#verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. +if [ ! -f "$file" ]; then + zip $zip_file_name $file +fi +#remove old files. We check if the zip exists first to make sure we don't break anything +if [ ! -f "$zip_file_name" ]; then + rm $file +fi +echo +echo "Please add the framework to the release." +echo "$framework_zip_file_name" # tell the user the name of the file we prepared +read user_input +#TODO - phase 3 - automate adding to release +# git add # 5 add docset to release (docs/docsets/) -echo "step 5: Add the docset to the release found in docs/docsets/." +echo +echo "step 5: Add the docset to the release (docs/docsets/)." +echo "Please add the docset to the release." +# probably need to zip this, and name it +# name should be SmartDeviceLink-$new_version_number-docset.tgz #BTW, what is tgz, and why not just .zip? +docset_directory="docs/docsets/" +docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" +tar -czf $docset_tar_file_name $docset_directory +echo "$docset_tar_file_name" # tell the user the name of the file we prepared +read user_input + +# TODO - phase 3 - automate adding to release # git add -# TODO - ? -echo "step 6: Rename the docset and framework similar to older releases" -# 6 rename docset similar to old releases -# TODO - figure out old/new names -# mv -# 6 rename framework similar to old releases -# TODO -# mv +# This was kind of handled in step 5, but I want to leave it here til phase 3, in case we decide to do it. +#echo +#echo "step 6: Rename the docset and framework similar to older releases" +#read user_input +# 6 rename docset similar to old releases +# name should be SmartDeviceLink-$new_version_number-docset.tgz -# TODO - don't we still need to commit/push the framework/docset changes? # script end echo -#echo "Work Complete" -#echo "Release complete. Time to party 🍾" +#echo "Work Complete" #WoW +#echo "Release complete. Time to party 🍾" #LivioCulture echo "Release complete" + + -- cgit v1.2.1 From 1c7ee6727bd85ed4f639e2683a7c3e546b270691 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 26 May 2022 14:39:38 -0400 Subject: changes per review. --- scripts/release.sh | 249 +++++++++++++++++++++-------------------------------- 1 file changed, 99 insertions(+), 150 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index eaa53ed83..d92b1cd42 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -8,7 +8,6 @@ # script start echo -#echo "Zug Zug" echo "Starting SDL release script..." # If we are running from the scripts directory, we want to pop back to the project root to do everything. @@ -21,6 +20,8 @@ if [[ $PWD != *"sdl_ios" ]]; then exit 0 fi +# TODO - For Phase3, this is probably the correct place to checkout develop +# git checkout develop # 1 bump version in projectFile echo @@ -31,14 +32,14 @@ project_file=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj new_file=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) -echo "Current Version "$current_version_number -echo "Current Build "$current_build_number +echo "Current Version: "$current_version_number +echo "Current Build: "$current_build_number # 1.2) prompt user for new version echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " read new_version_number -# 1.3) if not blank, or not the same +# 1.3) if not blank, or not the same, skip, otherwise change the version number if [ -z $new_version_number ]; then echo "No version number entered. Skipping..." else @@ -52,67 +53,36 @@ else fi fi -# in the event that the build number somehow is not what it should be, we have code to fix it. -#echo "New Build?" -#read new_build_number -# per review, the new build number will always be 1 -new_build_number=1 -if [ -z $new_build_number ]; then - echo "No project file change needed for build number" -else - if [ $current_build_number != $new_build_number ]; then - echo make the change - # 1.4) swap new version in to file - sed '/CURRENT_PROJECT_VERSION/{s/'$current_build_number'/'$new_build_number'/;}' $project_file > $new_file - mv -f $new_file $project_file - else - echo "No project file change needed for build number" - fi -fi - - # 2 update version in podspec # SmartDeviceLink-iOS.podspec echo echo "Step 2: Update version in podspec File" # 2.1) get the current version from the podspec file -PodSpecFile=SmartDeviceLink-iOS.podspec -PodSpecNewFile=NewFile.podspec -CurrentVersion=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $PodSpecFile) -echo "Current Version="$CurrentVersion - -# 2.2) prompt user for new version -#echo "New Version?" -#read new_version -# per review, the new version should be the same as above, but we should check with the user. -echo "Enter the new version number for podfile (semantic versioning x.x.x format) or blank to set to match project file ("$new_version_number"): " -read new_version - -# 2.3) If blank, use new version number from above. If new version is different from current, change it. -if [ -z $new_version ]; then - new_version=$new_version_number -fi -if [ $CurrentVersion != $new_version ]; then - echo "changing version in $PodSpecFile to $new_version" - # 2.4) swap new version in to file - sed '/s.version/{s/'$CurrentVersion'/'$new_version'/;}' $PodSpecFile > $PodSpecNewFile - mv -f $PodSpecNewFile $PodSpecFile +pod_spec_file=SmartDeviceLink-iOS.podspec +pod_spec_new_file=NewFile.podspec +current_version=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $pod_spec_file) +echo "Current Version: "$current_version + +# 2.2) Use new version number from above. If new version is different from current, change it. +if [ $current_version != $new_version_number ]; then + echo "changing version in $pod_spec_file to $new_version_number" + # 2.3) swap new version in to file + sed '/s.version/{s/'$current_version'/'$new_version_number'/;}' $pod_spec_file > $pod_spec_new_file + mv -f $pod_spec_new_file $pod_spec_file fi - - -# 3 update RPC versions +# 3 update RPC and protocol versions # /SmartDeviceLink/private/SDLGlobals.m -# TODO - extract version, prompt user to fix it if necessary. +# extract versions and prompt user to fix it if necessary. echo echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" - -# 3 update protocol versions -# /SmartDeviceLink/private/SDLGlobals.m -# TODO - extract version, prompt user to fix it if necessary. -echo -echo "Step 3: Please update protocol versions in /SmartDeviceLink/private/SDLGlobals.h" +file="SmartDeviceLink/private/SDLGlobals.m" +current_rpc_version=$(sed -n '/SDLMaxProxyProtocolVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) +current_protocol_version=$(sed -n '/SDLMaxProxyRPCVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) +echo "Current RPC Version: "$current_rpc_version +echo "Current Protocol Version: "$current_rpc_version +echo "Step 3: If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m" # 4 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. @@ -147,153 +117,132 @@ read user_input # 6 generate documentation echo -echo "6 generate documentation" echo "Would you like to automatically generate documentation with Jazzy (Y/n)?" read user_input if [[ ! $user_input == [Nn] ]]; then # 6 Install Jazzy # Check if Jazzy is already installed, and if not then install jazzy - echo "Check if Jazzy is already installed, and install if necessary (may require password)" if [ -z "$(mdfind -name 'Jazzy')" ]; then - echo "6 Install Jazzy" + echo "Jazzy is not installed, attempting to install (may require your password)..." sudo gem install jazzy fi # this runs Jazzy to generate the documentation - echo "Run Jazzy to generate documentation" + echo "Running Jazzy to generate documentation..." jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs -#else -# echo "not Jazzy..." fi # 7 Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). -# TODO - cleanup wording -# IDEA - maybe provide links to assist? -echo -echo "Step 7: ensure RPC_SPEC has released to master" -echo "Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring)" -echo "Then return here" -read user_input - - +echo +echo "The rpc spec site will be opened for you" +echo "https://github.com/smartdevicelink/rpc_spec" +echo "Please check if there is a new release of the RPC_SPEC to master." +echo "If there is, please update the rpc_spec submodule to point to the new master, then return and press enter." +read user_input # give user a chance to read before we throw a page at them. +open "https://github.com/smartdevicelink/rpc_spec" +read user_input # wait for user to return echo -echo "Please perform the following steps" +echo "Please perform the following steps to push the release to master:" # and every step of this process, the user needs complete control. # that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. # git commands -#todo - I don't like any of how this section is handled. # 8 commit release to develop -echo "step 8: commit release to develop" -# git checkout -# git add -A -# git commit -m -# git push --set-upstream origin +echo "Would you like to commit these changes to the develop branch? Y/n" +read user_input +#if [[ ! $user_input == [Nn] ]]; then +#todo - phase 3 - run the commands automatically +echo "Please Commit and push the changes to develop" # 8 merge release to master -echo "8.1 merge release to master" -# git merge +echo "Would you like to merge this release to master? (This will not push to master) Y/n" +read user_input +#if [[ ! $user_input == [Nn] ]]; then +#todo - phase 3 - run the commands automatically +echo "Please push to master, then press enter" +read user_input # 8 tag it -echo "8.2 tag the release" -# git tag +echo "Would you like to tag this release? (This will not push the tag) Y/n" +read user_input +#if [[ ! $user_input == [Nn] ]]; then +#todo - phase 3 - run the commands automatically # 8 merge master back to develop -echo "8.3 merge master back to develop" -# git merge +echo "Would you like to merge master back into develop? (This will not push the branch) Y/n" +# git merge develop read user_input - +#if [[ ! $user_input == [Nn] ]]; then +#todo - phase 3 - run the commands automatically echo echo "Please perform the following steps" # 1 Create new release for tag -echo "Step 1: Create new release for tag" -# ? +echo "Would you like to go to the Github releases page to create a release? Y/n" +read user_input +if [[ ! $user_input == [Nn] ]]; then + open "https://github.com/smartdevicelink/sdl_ios/releases" + + # TODO - phase 3 - this can be automated with gh + # https://cli.github.com/manual/gh_release_create +fi -# 1 add highlights of changes -echo "1.1 add highlights of changes" -# ? -# 2 push new release to primary cocoapod -echo "Step 2: push new release to primary Cocoapod" -echo "pod trunk push SmartDeviceLink.podspec --allow-warnings" -#pod trunk push SmartDeviceLink.podspec --allow-warnings +# 2 push new release to primary cocoapod # 3 Push the new release to the secondary cocoapod using command line: -echo "Step 3: Push the new release to the secondary cocoapod using command line:" -echo "pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings." -#pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. +echo "Would you like to push the release to CocoaPods? Y/N" read user_input +if [[ ! $user_input == [Nn] ]]; then + pod trunk push SmartDeviceLink.podspec --allow-warnings + pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. +else + # commands for manual + echo "pod trunk push SmartDeviceLink.podspec --allow-warnings" + echo "pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings." +fi -# 4 Add a binary xcframework archive for manual installation with the following commands -echo -echo "Step 4: Add a binary xcframework archive for manual installation" -# i -echo "4.i - Build Device archive" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO - -# ii -echo "4.ii - Build Simulator archive" -xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO - -# iii -echo "4.iii - Build framework" -xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' -# iv Compress the .xcframework and add the it to the release. +# 4 Add a binary xcframework archive for manual installation with the following commands echo -echo "4.iv Compress the .xcframework and add the it to the release." -file="SmartDeviceLink.xcframework" -zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" #SmartDeviceLink-7.3.1.xcframework.zip -if [ ! -f "$zip_file_name" ]; then - rm $zip_file_name #kill the old zip if present. Useful for re-running the script -fi -#verify file exists before acting on it. It's just good practice. Maybe review and apply through this script. -if [ ! -f "$file" ]; then - zip $zip_file_name $file -fi -#remove old files. We check if the zip exists first to make sure we don't break anything -if [ ! -f "$zip_file_name" ]; then - rm $file +echo "Would you like to create a binary xcframework for manual installation? Y/N" +read user_input +if [[ ! $user_input == [Nn] ]]; then + xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO + xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO + xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' + + file="SmartDeviceLink.xcframework" + zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" #SmartDeviceLink-7.3.1.xcframework.zip + if [ ! -f "$zip_file_name" ]; then + #kill the old zip if present. Useful for re-running the script + rm $zip_file_name + fi + #verify file exists before acting on it. + if [ ! -f "$file" ]; then + zip $zip_file_name $file + fi + #Check to see if the zip exists, and then remove old files. + if [ ! -f "$zip_file_name" ]; then + rm $file + fi fi -echo -echo "Please add the framework to the release." -echo "$framework_zip_file_name" # tell the user the name of the file we prepared +echo "The xcframework zip file was created at $framework_zip_file_name. Please add it to the Github Release, then press enter..." read user_input #TODO - phase 3 - automate adding to release -# git add -# 5 add docset to release (docs/docsets/) -echo -echo "step 5: Add the docset to the release (docs/docsets/)." -echo "Please add the docset to the release." -# probably need to zip this, and name it -# name should be SmartDeviceLink-$new_version_number-docset.tgz #BTW, what is tgz, and why not just .zip? +# Rename the docset and pack it +# SmartDeviceLink-$new_version_number-docset.tgz docset_directory="docs/docsets/" docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" tar -czf $docset_tar_file_name $docset_directory -echo "$docset_tar_file_name" # tell the user the name of the file we prepared -read user_input - +echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." # TODO - phase 3 - automate adding to release -# git add -# This was kind of handled in step 5, but I want to leave it here til phase 3, in case we decide to do it. -#echo -#echo "step 6: Rename the docset and framework similar to older releases" -#read user_input -# 6 rename docset similar to old releases -# name should be SmartDeviceLink-$new_version_number-docset.tgz - -# script end echo -#echo "Work Complete" #WoW -#echo "Release complete. Time to party 🍾" #LivioCulture -echo "Release complete" - - +echo "Release complete." \ No newline at end of file -- cgit v1.2.1 From c655434b8caeae8747bbc4eec771ef32624479f2 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 26 May 2022 16:20:04 -0400 Subject: testing and fixes --- scripts/release.sh | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index d92b1cd42..5534e4088 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -28,8 +28,8 @@ echo echo "Step 1: Update version in Project File" # 1.1) get the current version and build from the podspec file -project_file=./SmartDeviceLink-iOS.xcodeproj/project.pbxproj -new_file=./SmartDeviceLink-iOS.xcodeproj/new.pbxproj +project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" +new_file="./SmartDeviceLink-iOS.xcodeproj/new.pbxproj" current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) echo "Current Version: "$current_version_number @@ -59,8 +59,8 @@ echo echo "Step 2: Update version in podspec File" # 2.1) get the current version from the podspec file -pod_spec_file=SmartDeviceLink-iOS.podspec -pod_spec_new_file=NewFile.podspec +pod_spec_file="SmartDeviceLink-iOS.podspec" +pod_spec_new_file="NewFile.podspec" current_version=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $pod_spec_file) echo "Current Version: "$current_version @@ -81,13 +81,15 @@ file="SmartDeviceLink/private/SDLGlobals.m" current_rpc_version=$(sed -n '/SDLMaxProxyProtocolVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) current_protocol_version=$(sed -n '/SDLMaxProxyRPCVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) echo "Current RPC Version: "$current_rpc_version -echo "Current Protocol Version: "$current_rpc_version +echo "Current Protocol Version: "$current_protocol_version echo "Step 3: If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m" +read user_input # 4 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. # extract version and link from Package.swift -submodule_info=$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;p;}' $project_file) +dependency_file="Package.swift" +submodule_info=$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;p;}' $dependency_file) submodule_name=$(jq -n "{$submodule_info}" | jq -r .name) submodule_url=$(jq -n "{$submodule_info}" | jq -r .url) submodule_current_version=$(jq -n "{$submodule_info}" | jq -r .from) @@ -103,15 +105,14 @@ if [ $submodule_current_version != $submodule_latest_version ]; then echo "Please update the submodule $submodule_name before continuing with the release." echo echo "You must also edit the dependancy information in SmartDeviceLink-iOS.podspec" - echo + read user_input fi - # 5 update changelog -# IDEA - I should record the timestamp of the changelog, and then check after the user returns to see that they did touch the file. -# IDEA - we could also insert a template into the changelog that includes the version the users have selected above. +# TODO - insert a template into the changelog that includes the version the users have selected above. +#echo "A template for this release has been inserted into the changelog. Please update it." echo -echo "Please go update Changelog.md, then return here and press enter." +echo "Please update Changelog.md, then return here and press enter." read user_input # Changelog.md @@ -137,10 +138,11 @@ echo echo "The rpc spec site will be opened for you" echo "https://github.com/smartdevicelink/rpc_spec" echo "Please check if there is a new release of the RPC_SPEC to master." -echo "If there is, please update the rpc_spec submodule to point to the new master, then return and press enter." -read user_input # give user a chance to read before we throw a page at them. +echo "If there is, please update the rpc_spec submodule to point to the new master, then press enter." +read user_input open "https://github.com/smartdevicelink/rpc_spec" -read user_input # wait for user to return +read user_input +#TODO - phase ? - can this be automated. Check version. Check version at site. echo echo "Please perform the following steps to push the release to master:" @@ -186,6 +188,8 @@ if [[ ! $user_input == [Nn] ]]; then # TODO - phase 3 - this can be automated with gh # https://cli.github.com/manual/gh_release_create + # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) + # TODO - if/when we automate this, make sure to open the releases page so the user can review it. fi @@ -214,19 +218,19 @@ if [[ ! $user_input == [Nn] ]]; then xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' - file="SmartDeviceLink.xcframework" - zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" #SmartDeviceLink-7.3.1.xcframework.zip - if [ ! -f "$zip_file_name" ]; then + folder="SmartDeviceLink.xcframework" + zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" + if [ -f $zip_file_name ]; then #kill the old zip if present. Useful for re-running the script rm $zip_file_name fi #verify file exists before acting on it. - if [ ! -f "$file" ]; then - zip $zip_file_name $file + if [ -d "$folder" ]; then + zip $zip_file_name $folder fi #Check to see if the zip exists, and then remove old files. - if [ ! -f "$zip_file_name" ]; then - rm $file + if [ -f "$zip_file_name" ]; then + rm $folder fi fi -- cgit v1.2.1 From 00ca093a086864e7545c3597154f8cfdddf944e0 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 26 May 2022 16:51:20 -0400 Subject: final testing changes in testing there were a few issues with how I was detecting files and directories. --- scripts/release.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 5534e4088..dc877f99e 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -230,11 +230,12 @@ if [[ ! $user_input == [Nn] ]]; then fi #Check to see if the zip exists, and then remove old files. if [ -f "$zip_file_name" ]; then - rm $folder + rm -r $folder fi fi -echo "The xcframework zip file was created at $framework_zip_file_name. Please add it to the Github Release, then press enter..." +echo +echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." read user_input #TODO - phase 3 - automate adding to release @@ -243,7 +244,9 @@ read user_input docset_directory="docs/docsets/" docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" tar -czf $docset_tar_file_name $docset_directory +echo echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." +read user_input # TODO - phase 3 - automate adding to release -- cgit v1.2.1 From 0fb030405f472cc825b9816b361d9028af858955 Mon Sep 17 00:00:00 2001 From: George Miller Date: Wed, 1 Jun 2022 15:41:02 -0400 Subject: Review notes The bulk of the review comments have been addressed. There are still some left. --- scripts/release.sh | 195 +++++++++++++++++++++++++++-------------------------- 1 file changed, 101 insertions(+), 94 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index dc877f99e..3f30ce4ba 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -6,6 +6,26 @@ # numbering follows this document: https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps # The numbering does restart halfway because the document does. +# a utility function for prompting the user Y/N +# takes in a string promt for the input +# returns 1 for yes/true or 0 for no/false +prompt_user(){ + user_input="g" + echo $1" (Y/N)" + read user_input + while [[ ! $user_input == [YyNn] ]]; do + echo $1" (Y/N)?" + read user_input + done + if [[ ! $user_input == [Nn] ]]; then + return 1 + else + return 0 + fi +} + + + # script start echo echo "Starting SDL release script..." @@ -35,17 +55,18 @@ current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSI echo "Current Version: "$current_version_number echo "Current Build: "$current_build_number -# 1.2) prompt user for new version +# Prompt user for new version echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " read new_version_number -# 1.3) if not blank, or not the same, skip, otherwise change the version number +# If blank or the same, then skip. Otherwise change the version number if [ -z $new_version_number ]; then echo "No version number entered. Skipping..." + new_version_number=$current_version_number else if [ $current_version_number != $new_version_number ]; then echo "Changing Version Number in $project_file" - # 1.4) swap new version in to file + # Swap new version in to file sed '/MARKETING_VERSION/{s/'$current_version_number'/'$new_version_number'/;}' $project_file > $new_file mv -f $new_file $project_file else @@ -53,74 +74,73 @@ else fi fi -# 2 update version in podspec -# SmartDeviceLink-iOS.podspec -echo -echo "Step 2: Update version in podspec File" - -# 2.1) get the current version from the podspec file +# Get the current version from the podspec file pod_spec_file="SmartDeviceLink-iOS.podspec" pod_spec_new_file="NewFile.podspec" current_version=$(sed -n '/s.version/{s/s.version//;s/=//;s/[\"]//g;s/^[[:space:]]*//g;p;q;}' $pod_spec_file) -echo "Current Version: "$current_version -# 2.2) Use new version number from above. If new version is different from current, change it. +# Use new version number from above. If new version is different from current, change it. if [ $current_version != $new_version_number ]; then echo "changing version in $pod_spec_file to $new_version_number" - # 2.3) swap new version in to file + # Swap new version in to file sed '/s.version/{s/'$current_version'/'$new_version_number'/;}' $pod_spec_file > $pod_spec_new_file mv -f $pod_spec_new_file $pod_spec_file fi -# 3 update RPC and protocol versions -# /SmartDeviceLink/private/SDLGlobals.m -# extract versions and prompt user to fix it if necessary. +# Step 2: Update RPC and protocol versions in /SmartDeviceLink/private/SDLGlobals.m echo -echo "Step 3: Please update RPC version in /SmartDeviceLink/private/SDLGlobals.h" +echo "Step 2: Checking SDLGlobals.m for RPC and Protocol versions" file="SmartDeviceLink/private/SDLGlobals.m" current_rpc_version=$(sed -n '/SDLMaxProxyProtocolVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) current_protocol_version=$(sed -n '/SDLMaxProxyRPCVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) echo "Current RPC Version: "$current_rpc_version echo "Current Protocol Version: "$current_protocol_version -echo "Step 3: If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m" +echo "If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m. Then press enter." read user_input - # 4 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. # extract version and link from Package.swift dependency_file="Package.swift" -submodule_info=$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;p;}' $dependency_file) -submodule_name=$(jq -n "{$submodule_info}" | jq -r .name) -submodule_url=$(jq -n "{$submodule_info}" | jq -r .url) -submodule_current_version=$(jq -n "{$submodule_info}" | jq -r .from) - -# figure out latest version (visit link?) -submodule_latest_version=$(gh repo view $submodule_url --json latestRelease -q .latestRelease.tagName) - -# compare versions -if [ $submodule_current_version != $submodule_latest_version ]; then - echo - echo "Current version of $submodule_name: "$submodule_current_version - echo "Latest version of $submodule_name: "$submodule_latest_version - echo "Please update the submodule $submodule_name before continuing with the release." +submodule_info="$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;s/^[[:space:]]*//g;p;}' $dependency_file)" +if [ ! -z "$submodule_info" ]; then + #loop through our dependencies + while IFS= read -r record ; + do + if [ ! -z "$record" ]; then + record_info="$(sed 's/,/\n/g' <<< $record)" + record_name=$(sed -n '/name:/{s/name://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") + record_url=$(sed -n '/url:/{s/url://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") + record_version=$(sed -n '/from:/{s/from://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") + + # figure out latest version (visit link?) + submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) + + # compare versions + if [ $record_version != $submodule_latest_version ]; then + echo + echo "Current version of $record_name: "$record_version + echo "Latest version of $record_name: "$submodule_latest_version + fi + fi + done <<< "$submodule_info" echo + echo "Please update the submodules before continuing with the release." echo "You must also edit the dependancy information in SmartDeviceLink-iOS.podspec" - read user_input + read user_input fi # 5 update changelog # TODO - insert a template into the changelog that includes the version the users have selected above. #echo "A template for this release has been inserted into the changelog. Please update it." echo -echo "Please update Changelog.md, then return here and press enter." +echo "Please update CHANGELOG.md, then return here and press enter." read user_input -# Changelog.md + # 6 generate documentation echo -echo "Would you like to automatically generate documentation with Jazzy (Y/n)?" -read user_input -if [[ ! $user_input == [Nn] ]]; then +prompt_user "Would you like to automatically generate documentation with Jazzy?" +if [[ $? == 1 ]]; then # 6 Install Jazzy # Check if Jazzy is already installed, and if not then install jazzy if [ -z "$(mdfind -name 'Jazzy')" ]; then @@ -135,85 +155,76 @@ fi # 7 Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). echo -echo "The rpc spec site will be opened for you" -echo "https://github.com/smartdevicelink/rpc_spec" -echo "Please check if there is a new release of the RPC_SPEC to master." -echo "If there is, please update the rpc_spec submodule to point to the new master, then press enter." -read user_input -open "https://github.com/smartdevicelink/rpc_spec" +echo "Please check if there is a new release of the RPC_SPEC on https://www.github.com/smartdevicelink/rpc_spec" +echo "If there is, please update the rpc_spec submodule to point to the newest commit on the master branch. Press enter to continue..." read user_input #TODO - phase ? - can this be automated. Check version. Check version at site. +#record_url=https://www.github.com/smartdevicelink/rpc_spec +#submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) echo -echo "Please perform the following steps to push the release to master:" -# and every step of this process, the user needs complete control. -# that means we tell them what we want to do, ask them if they want us to do it, report the results, and gracefully handle exits. +echo "Please perform the following steps to set up the Github release." # git commands # 8 commit release to develop -echo "Would you like to commit these changes to the develop branch? Y/n" -read user_input -#if [[ ! $user_input == [Nn] ]]; then -#todo - phase 3 - run the commands automatically -echo "Please Commit and push the changes to develop" +prompt_user "Would you like to commit these changes to the develop branch?" +if [[ $? == 1 ]]; then + #todo - phase 3 - run the commands automatically + echo "git commands here" + echo "Please Commit and push the changes to develop" +fi +echo # 8 merge release to master -echo "Would you like to merge this release to master? (This will not push to master) Y/n" -read user_input -#if [[ ! $user_input == [Nn] ]]; then -#todo - phase 3 - run the commands automatically -echo "Please push to master, then press enter" -read user_input +prompt_user "Would you like to merge this release to master? (This will not push to master.)?" +if [[ $? == 1 ]]; then + echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." + #todo - phase 3 - run the commands automatically +fi +echo # 8 tag it -echo "Would you like to tag this release? (This will not push the tag) Y/n" -read user_input -#if [[ ! $user_input == [Nn] ]]; then -#todo - phase 3 - run the commands automatically +prompt_user "Would you like to tag this release? (This will not push the tag)?" +if [[ $? == 1 ]]; then + echo "Tag with version from above" + # todo - look at old released to figure out tag format + # todo - phase 3 - run the commands automatically +fi +echo # 8 merge master back to develop -echo "Would you like to merge master back into develop? (This will not push the branch) Y/n" -# git merge develop -read user_input -#if [[ ! $user_input == [Nn] ]]; then -#todo - phase 3 - run the commands automatically +prompt_user "Would you like to merge master back into develop? (This will not push the branch.)?" +if [[ $? == 1 ]]; then + # git merge develop + echo "git commands here" + #todo - phase 3 - run the commands automatically +fi echo -echo "Please perform the following steps" # 1 Create new release for tag -echo "Would you like to go to the Github releases page to create a release? Y/n" -read user_input -if [[ ! $user_input == [Nn] ]]; then +prompt_user "Would you like to open to the Github releases page to create a release?" +if [[ $? == 1 ]]; then open "https://github.com/smartdevicelink/sdl_ios/releases" - # TODO - phase 3 - this can be automated with gh + # TODO - phase 4 - this can be automated with gh # https://cli.github.com/manual/gh_release_create # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) # TODO - if/when we automate this, make sure to open the releases page so the user can review it. fi - - +echo # 2 push new release to primary cocoapod # 3 Push the new release to the secondary cocoapod using command line: -echo "Would you like to push the release to CocoaPods? Y/N" -read user_input -if [[ ! $user_input == [Nn] ]]; then +prompt_user "Would you like to push the release to CocoaPods?" +if [[ $? == 1 ]]; then pod trunk push SmartDeviceLink.podspec --allow-warnings pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. -else - # commands for manual - echo "pod trunk push SmartDeviceLink.podspec --allow-warnings" - echo "pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings." fi - - # 4 Add a binary xcframework archive for manual installation with the following commands echo -echo "Would you like to create a binary xcframework for manual installation? Y/N" -read user_input -if [[ ! $user_input == [Nn] ]]; then +prompt_user "Would you like to create a binary xcframework for manual installation?" +if [[ $? == 1 ]]; then xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' @@ -232,13 +243,12 @@ if [[ ! $user_input == [Nn] ]]; then if [ -f "$zip_file_name" ]; then rm -r $folder fi + echo + echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." + read user_input + #TODO - phase 4 - automate adding to release fi -echo -echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." -read user_input -#TODO - phase 3 - automate adding to release - # Rename the docset and pack it # SmartDeviceLink-$new_version_number-docset.tgz docset_directory="docs/docsets/" @@ -247,9 +257,6 @@ tar -czf $docset_tar_file_name $docset_directory echo echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." read user_input -# TODO - phase 3 - automate adding to release - - echo echo "Release complete." \ No newline at end of file -- cgit v1.2.1 From 127c39bf1f920c613f86f79945cf4a9689983ba6 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 2 Jun 2022 10:36:08 -0400 Subject: git commands are in place. --- scripts/release.sh | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 3f30ce4ba..e07ff1314 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -24,6 +24,8 @@ prompt_user(){ fi } +# TODO - phase 4 - github cli "gh" needs to be installed before we can use those commands. +# gh commands are commented for now. # script start @@ -40,8 +42,12 @@ if [[ $PWD != *"sdl_ios" ]]; then exit 0 fi -# TODO - For Phase3, this is probably the correct place to checkout develop -# git checkout develop +# setup branch variables +develop_branch="develop" +main_branch="master" + +# Checkout develop +git checkout $develop_branch # 1 bump version in projectFile echo @@ -113,14 +119,14 @@ if [ ! -z "$submodule_info" ]; then record_version=$(sed -n '/from:/{s/from://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") # figure out latest version (visit link?) - submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) + #submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) # compare versions - if [ $record_version != $submodule_latest_version ]; then + #if [ $record_version != $submodule_latest_version ]; then echo echo "Current version of $record_name: "$record_version - echo "Latest version of $record_name: "$submodule_latest_version - fi + #echo "Latest version of $record_name: "$submodule_latest_version + #fi fi done <<< "$submodule_info" echo @@ -158,7 +164,7 @@ echo echo "Please check if there is a new release of the RPC_SPEC on https://www.github.com/smartdevicelink/rpc_spec" echo "If there is, please update the rpc_spec submodule to point to the newest commit on the master branch. Press enter to continue..." read user_input -#TODO - phase ? - can this be automated. Check version. Check version at site. +#TODO - phase ? - can this be automated. Check version here. Check version at site. #record_url=https://www.github.com/smartdevicelink/rpc_spec #submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) @@ -170,8 +176,15 @@ echo "Please perform the following steps to set up the Github release." prompt_user "Would you like to commit these changes to the develop branch?" if [[ $? == 1 ]]; then #todo - phase 3 - run the commands automatically - echo "git commands here" - echo "Please Commit and push the changes to develop" + + # add changes to the commit + # -A is probably not correct. + git add -A + # create the commit + commit_message="Update for release $new_version_number" + git commit -m commit_message + # push the commit to develop + git push --set-upstream origin $develop_branch fi echo @@ -179,7 +192,12 @@ echo prompt_user "Would you like to merge this release to master? (This will not push to master.)?" if [[ $? == 1 ]]; then echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." - #todo - phase 3 - run the commands automatically + + # checkout master + git checkout $main_branch + + # merge develop with master + git merge $main_branch $develop_branch fi echo @@ -187,17 +205,14 @@ echo prompt_user "Would you like to tag this release? (This will not push the tag)?" if [[ $? == 1 ]]; then echo "Tag with version from above" - # todo - look at old released to figure out tag format - # todo - phase 3 - run the commands automatically + git tag $new_version_number fi echo # 8 merge master back to develop prompt_user "Would you like to merge master back into develop? (This will not push the branch.)?" if [[ $? == 1 ]]; then - # git merge develop - echo "git commands here" - #todo - phase 3 - run the commands automatically + git merge $develop_branch $main_branch fi echo @@ -257,6 +272,7 @@ tar -czf $docset_tar_file_name $docset_directory echo echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." read user_input +#todo - phase 4 - adding the docset to the release shoudl also be automatic echo echo "Release complete." \ No newline at end of file -- cgit v1.2.1 From 19dc9dca23b56c20509d8e5f19e3d1d9e5790110 Mon Sep 17 00:00:00 2001 From: George Miller Date: Fri, 3 Jun 2022 15:38:31 -0400 Subject: commit right before testing --- scripts/release.sh | 117 +++++++++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index e07ff1314..7ee0f8553 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -9,7 +9,7 @@ # a utility function for prompting the user Y/N # takes in a string promt for the input # returns 1 for yes/true or 0 for no/false -prompt_user(){ +prompt_user() { user_input="g" echo $1" (Y/N)" read user_input @@ -36,7 +36,7 @@ echo "Starting SDL release script..." if [[ $PWD == *"scripts" ]]; then cd .. fi -# If, for soem reason, we are not now in the correct working directory, exit +# If, for some reason, we are not now in the correct working directory, exit if [[ $PWD != *"sdl_ios" ]]; then echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" exit 0 @@ -104,50 +104,50 @@ echo "Current Protocol Version: "$current_protocol_version echo "If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m. Then press enter." read user_input -# 4 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. +# 3 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. # extract version and link from Package.swift -dependency_file="Package.swift" -submodule_info="$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;s/^[[:space:]]*//g;p;}' $dependency_file)" +package_file="Package.swift" +package_dependency_info="$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;s/^[[:space:]]*//g;p;}' $package_file)" if [ ! -z "$submodule_info" ]; then - #loop through our dependencies - while IFS= read -r record ; + #loop through the dependencies + while IFS= read -r dependency_record ; do - if [ ! -z "$record" ]; then - record_info="$(sed 's/,/\n/g' <<< $record)" + # if the dependency_record in the dependancies is not empty (the first one usually is due to string interpretation of a list) + if [ ! -z "$dependency_record" ]; then + # identify the fields of the record + record_info="$(sed 's/,/\n/g' <<< $dependency_record)" record_name=$(sed -n '/name:/{s/name://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") record_url=$(sed -n '/url:/{s/url://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") record_version=$(sed -n '/from:/{s/from://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") # figure out latest version (visit link?) - #submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) + #dependency_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) # compare versions - #if [ $record_version != $submodule_latest_version ]; then + #if [ $record_version != $dependency_latest_version ]; then echo echo "Current version of $record_name: "$record_version - #echo "Latest version of $record_name: "$submodule_latest_version + #echo "Latest version of $record_name: "$dependency_latest_version #fi fi done <<< "$submodule_info" echo - echo "Please update the submodules before continuing with the release." - echo "You must also edit the dependancy information in SmartDeviceLink-iOS.podspec" + echo "Please update the dependencies in Package.swift, SmartDeviceLink.podspec, and SmartDeviceLink-iOS.podspec appropriately, then press enter..." read user_input fi -# 5 update changelog +# 4 update changelog # TODO - insert a template into the changelog that includes the version the users have selected above. #echo "A template for this release has been inserted into the changelog. Please update it." echo -echo "Please update CHANGELOG.md, then return here and press enter." +echo "Please update CHANGELOG.md, then return here and press enter..." read user_input -# 6 generate documentation +# 5 generate documentation echo -prompt_user "Would you like to automatically generate documentation with Jazzy?" +prompt_user "Would you like to automatically generate documentation with Jazzy" if [[ $? == 1 ]]; then - # 6 Install Jazzy # Check if Jazzy is already installed, and if not then install jazzy if [ -z "$(mdfind -name 'Jazzy')" ]; then echo "Jazzy is not installed, attempting to install (may require your password)..." @@ -159,7 +159,7 @@ if [[ $? == 1 ]]; then jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs fi -# 7 Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). +# 6 Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). echo echo "Please check if there is a new release of the RPC_SPEC on https://www.github.com/smartdevicelink/rpc_spec" echo "If there is, please update the rpc_spec submodule to point to the newest commit on the master branch. Press enter to continue..." @@ -172,52 +172,49 @@ echo echo "Please perform the following steps to set up the Github release." # git commands -# 8 commit release to develop -prompt_user "Would you like to commit these changes to the develop branch?" +# 7 commit release to develop +prompt_user "Would you like to commit and push these changes to the develop branch" if [[ $? == 1 ]]; then - #todo - phase 3 - run the commands automatically - - # add changes to the commit - # -A is probably not correct. + # Add, commit, and push changes git add -A - # create the commit - commit_message="Update for release $new_version_number" - git commit -m commit_message - # push the commit to develop + git commit -m "Update for release $new_version_number" git push --set-upstream origin $develop_branch fi echo # 8 merge release to master -prompt_user "Would you like to merge this release to master? (This will not push to master.)?" +prompt_user "Would you like to merge this release to master? (This will not push to master)" if [[ $? == 1 ]]; then - echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." - # checkout master git checkout $main_branch # merge develop with master git merge $main_branch $develop_branch + + echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." fi + + echo -# 8 tag it -prompt_user "Would you like to tag this release? (This will not push the tag)?" +# 9 tag it +prompt_user "Would you like to tag this release with $new_version_number? (This will not push the tag)" if [[ $? == 1 ]]; then echo "Tag with version from above" git tag $new_version_number + # IDEA - else condition that allows the user to enter a different tag fi echo -# 8 merge master back to develop -prompt_user "Would you like to merge master back into develop? (This will not push the branch.)?" +# 10 merge master back to develop +prompt_user "Would you like to merge master back into develop (This will not push the branch)" if [[ $? == 1 ]]; then git merge $develop_branch $main_branch fi echo -# 1 Create new release for tag -prompt_user "Would you like to open to the Github releases page to create a release?" +# 11 Create new release for tag +prompt_user "Would you like to open to the Github releases page to create a release" if [[ $? == 1 ]]; then open "https://github.com/smartdevicelink/sdl_ios/releases" @@ -228,17 +225,16 @@ if [[ $? == 1 ]]; then fi echo -# 2 push new release to primary cocoapod -# 3 Push the new release to the secondary cocoapod using command line: -prompt_user "Would you like to push the release to CocoaPods?" +# 12 push new release to primary and secondary cocoapod using command line: +prompt_user "Would you like to push the release to CocoaPods" if [[ $? == 1 ]]; then pod trunk push SmartDeviceLink.podspec --allow-warnings - pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings. + pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings fi -# 4 Add a binary xcframework archive for manual installation with the following commands +# 13 Add a binary xcframework archive for manual installation with the following commands echo -prompt_user "Would you like to create a binary xcframework for manual installation?" +prompt_user "Would you like to create a binary xcframework for manual installation" if [[ $? == 1 ]]; then xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO @@ -247,32 +243,39 @@ if [[ $? == 1 ]]; then folder="SmartDeviceLink.xcframework" zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" if [ -f $zip_file_name ]; then - #kill the old zip if present. Useful for re-running the script + # kill the old zip if present. Useful for re-running the script rm $zip_file_name fi - #verify file exists before acting on it. + + # verify file exists before acting on it. if [ -d "$folder" ]; then zip $zip_file_name $folder fi - #Check to see if the zip exists, and then remove old files. + + # Check to see if the zip exists, and then remove old files. if [ -f "$zip_file_name" ]; then rm -r $folder fi + echo echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." read user_input #TODO - phase 4 - automate adding to release fi -# Rename the docset and pack it -# SmartDeviceLink-$new_version_number-docset.tgz -docset_directory="docs/docsets/" -docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" -tar -czf $docset_tar_file_name $docset_directory -echo -echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." -read user_input -#todo - phase 4 - adding the docset to the release shoudl also be automatic +# 14 Rename the docset and pack it +echo +prompt_user "Would you like to create a the docset" +if [[ $? == 1 ]]; then + # SmartDeviceLink-$new_version_number-docset.tgz + docset_directory="docs/docsets/" + docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" + tar -czf $docset_tar_file_name $docset_directory + echo + echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." + read user_input + #todo - phase 4 - adding the docset to the release shoudl also be automatic +fi echo echo "Release complete." \ No newline at end of file -- cgit v1.2.1 From d7e23b481bc5c87c79a19b741893c0fd86b72f72 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 08:26:52 -0400 Subject: daily commit --- scripts/create_framework.sh | 98 +++++++++++++++++++++++++++++++++++++++++++++ scripts/release.sh | 8 ++-- 2 files changed, 103 insertions(+), 3 deletions(-) create mode 100755 scripts/create_framework.sh diff --git a/scripts/create_framework.sh b/scripts/create_framework.sh new file mode 100755 index 000000000..64e079769 --- /dev/null +++ b/scripts/create_framework.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +# George Miller +# 06-03-2022 +# If you don't have permission to run, try: chmod u+x create_framework.sh + +# a utility function for prompting the user Y/N +# takes in a string promt for the input +# returns 1 for yes/true or 0 for no/false +prompt_user() { + user_input="g" + echo + echo $1" (Y/N)" + read user_input + while [[ ! $user_input == [YyNn] ]]; do + echo $1" (Y/N)?" + read user_input + done + if [[ ! $user_input == [Nn] ]]; then + return 1 + else + return 0 + fi +} + +# 1 make sure we are in teh correct directory +# If we are running from the scripts directory, we want to pop back to the project root to do everything. +if [[ $PWD == *"scripts" ]]; then + cd .. +fi +# If, for some reason, we are not now in the correct working directory, exit +if [[ $PWD != *"sdl_ios" ]]; then + echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" + exit 0 +fi + +# 2 get the verison number +# get the verison number +# at this point the version in the project file should be correct, so use it. +project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" +current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) +if [ -z $current_version_number ]; then current_version_number="1.0.0"; fi +echo "Current Version: "$current_version_number + +# todo - we can streamline this by trusting the project file to always have the correct version (bail out if project file missing) +prompt_user "Is this version correct" +if [[ $? == 0 ]]; then + # Prompt user for new version + echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " + read new_version_number + + # If blank or the same, then skip. Otherwise change the version number + if [ -z $new_version_number ]; then + echo "No version number entered. Skipping..." + new_version_number=$current_version_number + fi +fi + +# 3 Add a binary xcframework archive for manual installation with the following commands +echo +echo "Creating a binary xcframework for manual installation" +# this builds the framework +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO +xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO +xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' + +# todo - is there a way we can test that the build was successful. + +folder="SmartDeviceLink.xcframework" +zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" +read user_input +# kill the old zip if present. Useful for re-running the script +if [ -f $zip_file_name ]; then rm $zip_file_name; fi +read user_input +# verify file exists before acting on it. +if [ -d "$folder" ]; then zip $zip_file_name $folder; fi +read user_input +# Check to see if the zip exists, and then remove old files. +if [ -f "$zip_file_name" ]; then rm -r $folder; fi +read user_input + +echo +echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." +read user_input + +# 14 Rename the docset and pack it +prompt_user "Would you like to create a the docset" +if [[ $? == 1 ]]; then + # SmartDeviceLink-$new_version_number-docset.tgz + docset_directory="docs/docsets/" + docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" + tar -czf $docset_tar_file_name $docset_directory + + echo + echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." + read user_input + #todo - phase 4 - adding the docset to the release shoudl also be automatic +fi \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index 7ee0f8553..660d13068 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -2,7 +2,7 @@ # George Miller # 05-17-2022 -# If you don't have permission to run, try: chmod u+x Release.sh +# If you don't have permission to run, try: chmod u+x release.sh # numbering follows this document: https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps # The numbering does restart halfway because the document does. @@ -11,7 +11,7 @@ # returns 1 for yes/true or 0 for no/false prompt_user() { user_input="g" - echo $1" (Y/N)" + echo $1" (Y/N)?" read user_input while [[ ! $user_input == [YyNn] ]]; do echo $1" (Y/N)?" @@ -101,7 +101,7 @@ current_rpc_version=$(sed -n '/SDLMaxProxyProtocolVersion/{s/^.*@//;s/[\;]//;s/[ current_protocol_version=$(sed -n '/SDLMaxProxyRPCVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) echo "Current RPC Version: "$current_rpc_version echo "Current Protocol Version: "$current_protocol_version -echo "If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m. Then press enter." +echo "If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m. Then press enter..." read user_input # 3 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. @@ -232,6 +232,8 @@ if [[ $? == 1 ]]; then pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings fi +# TODO - Chop here, and make everything for the framework into it's own script. + # 13 Add a binary xcframework archive for manual installation with the following commands echo prompt_user "Would you like to create a binary xcframework for manual installation" -- cgit v1.2.1 From 1e189c8ade7b3e536c4fc031d76bd1c4f1984249 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 11:51:11 -0400 Subject: testing Comiting before I do my testing in case I accidentally discard changes --- scripts/cleanup.sh | 40 +++++++++++++++++++++++ scripts/create_framework.sh | 80 ++++++++++++++++++++++----------------------- scripts/release.sh | 36 ++++---------------- 3 files changed, 85 insertions(+), 71 deletions(-) create mode 100755 scripts/cleanup.sh diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh new file mode 100755 index 000000000..e66178707 --- /dev/null +++ b/scripts/cleanup.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# the purpose here is to remove some files that may be created during testing of the framework script + +#process is that for each file, we check if it exists, and if it does, we nuke it + +# If we are running from the scripts directory, we want to pop back to the project root to do everything. +if [[ $PWD == *"scripts" ]]; then + cd .. +fi +# If, for some reason, we are not now in the correct working directory, exit +if [[ $PWD != *"sdl_ios" ]]; then + echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" + exit 0 +fi + +# these show in finder as files, but show in Fork as folders +# bash aparently also sees them as folders +#SmartDeviceLink-Device.xcarchive +#SmartDeviceLink-Simulator.xcarchive + +#folders +folder="SmartDeviceLink-Device.xcarchive" +if [ -d "$folder" ]; then rm -r $folder; fi + +folder="SmartDeviceLink-Simulator.xcarchive" +if [ -d "$folder" ]; then rm -r $folder; fi + +# this one shouldn't exist, but just in case +folder="SmartDeviceLink.xcframework" +if [ -d "$folder" ]; then rm -r $folder; fi + + +# this is a file, but finder can open it like a folder +# also, the version in the middle changes. SO we'll use wildcard chars +#SmartDeviceLink-7.4.2.xcframework.zip + +#files +file_name="SmartDeviceLink-?.?.?.xcframework.zip" +if [ -f $file_name ]; then rm $file_name; fi diff --git a/scripts/create_framework.sh b/scripts/create_framework.sh index 64e079769..952e45adb 100755 --- a/scripts/create_framework.sh +++ b/scripts/create_framework.sh @@ -1,10 +1,11 @@ #!/bin/bash # George Miller -# 06-03-2022 +# 07-07-2022 # If you don't have permission to run, try: chmod u+x create_framework.sh -# a utility function for prompting the user Y/N + +# utility function for prompting the user Y/N # takes in a string promt for the input # returns 1 for yes/true or 0 for no/false prompt_user() { @@ -34,28 +35,33 @@ if [[ $PWD != *"sdl_ios" ]]; then exit 0 fi -# 2 get the verison number -# get the verison number -# at this point the version in the project file should be correct, so use it. -project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" -current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) -if [ -z $current_version_number ]; then current_version_number="1.0.0"; fi -echo "Current Version: "$current_version_number -# todo - we can streamline this by trusting the project file to always have the correct version (bail out if project file missing) -prompt_user "Is this version correct" -if [[ $? == 0 ]]; then - # Prompt user for new version - echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " - read new_version_number +# if there is no command line ask for a version number +if [ -z $1 ]; then + # 2 get the verison number + # get the verison number + # at this point the version in the project file should be correct, so use it. + project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" + current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) + if [ -z $current_version_number ]; then current_version_number="1.0.0"; fi + echo "Current Version: "$current_version_number + + # todo - we can streamline this by trusting the project file to always have the correct version (bail out if project file missing) + prompt_user "Is this version correct" + if [[ $? == 0 ]]; then + # Prompt user for new version + echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " + read new_version_number - # If blank or the same, then skip. Otherwise change the version number - if [ -z $new_version_number ]; then - echo "No version number entered. Skipping..." - new_version_number=$current_version_number + # If blank or the same, then skip. Otherwise change the version number + if [ -z $new_version_number ]; then + echo "No version number entered. Skipping..." + new_version_number=$current_version_number + fi fi +else + new_version_number=$1 fi - # 3 Add a binary xcframework archive for manual installation with the following commands echo echo "Creating a binary xcframework for manual installation" @@ -68,31 +74,23 @@ xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Pr folder="SmartDeviceLink.xcframework" zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" -read user_input # kill the old zip if present. Useful for re-running the script if [ -f $zip_file_name ]; then rm $zip_file_name; fi -read user_input -# verify file exists before acting on it. -if [ -d "$folder" ]; then zip $zip_file_name $folder; fi -read user_input -# Check to see if the zip exists, and then remove old files. -if [ -f "$zip_file_name" ]; then rm -r $folder; fi -read user_input +# verify folder exists before acting on it. +if [ -d "$folder" ]; then + zip $zip_file_name $folder + # Check to see if the zip exists, and then remove old files. + if [ -f "$zip_file_name" ]; then rm -r $folder; fi +fi + +#cleanup artifacts +folder="SmartDeviceLink-Device.xcarchive" +if [ -d "$folder" ]; then rm -r $folder; fi + +folder="SmartDeviceLink-Simulator.xcarchive" +if [ -d "$folder" ]; then rm -r $folder; fi echo echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." read user_input -# 14 Rename the docset and pack it -prompt_user "Would you like to create a the docset" -if [[ $? == 1 ]]; then - # SmartDeviceLink-$new_version_number-docset.tgz - docset_directory="docs/docsets/" - docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" - tar -czf $docset_tar_file_name $docset_directory - - echo - echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." - read user_input - #todo - phase 4 - adding the docset to the release shoudl also be automatic -fi \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index 660d13068..72d143e62 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -142,6 +142,7 @@ fi echo echo "Please update CHANGELOG.md, then return here and press enter..." read user_input +# TODO - check modified info before and after so we can detect if the user failed to update the file. # 5 generate documentation @@ -194,8 +195,6 @@ if [[ $? == 1 ]]; then echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." fi - - echo # 9 tag it prompt_user "Would you like to tag this release with $new_version_number? (This will not push the tag)" @@ -232,37 +231,14 @@ if [[ $? == 1 ]]; then pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings fi -# TODO - Chop here, and make everything for the framework into it's own script. - -# 13 Add a binary xcframework archive for manual installation with the following commands echo prompt_user "Would you like to create a binary xcframework for manual installation" if [[ $? == 1 ]]; then - xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO - xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO - xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' - - folder="SmartDeviceLink.xcframework" - zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" - if [ -f $zip_file_name ]; then - # kill the old zip if present. Useful for re-running the script - rm $zip_file_name - fi - - # verify file exists before acting on it. - if [ -d "$folder" ]; then - zip $zip_file_name $folder - fi - - # Check to see if the zip exists, and then remove old files. - if [ -f "$zip_file_name" ]; then - rm -r $folder - fi - - echo - echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." - read user_input - #TODO - phase 4 - automate adding to release + # create framework + # we pass in the version so that the framework script does not need to ask + # remember the user will need to ahve permissions for the framework script + chmod u+x ./scripts/create_framework.sh #I don't know if this works? + ./scripts/create_framework.sh $new_version_number fi # 14 Rename the docset and pack it -- cgit v1.2.1 From 7bbaaa9f40f7c6db1deba95653cbbbc418b31054 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 16:15:30 -0400 Subject: testing --- scripts/release.sh | 151 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 90 insertions(+), 61 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 72d143e62..09e682f63 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -11,6 +11,7 @@ # returns 1 for yes/true or 0 for no/false prompt_user() { user_input="g" + echo echo $1" (Y/N)?" read user_input while [[ ! $user_input == [YyNn] ]]; do @@ -24,10 +25,9 @@ prompt_user() { fi } -# TODO - phase 4 - github cli "gh" needs to be installed before we can use those commands. +# TODO - phase 4 - github cli "gh" needs to be installed before we can use those commands. We could automate this or at least check if GH is installed. # gh commands are commented for now. - # script start echo echo "Starting SDL release script..." @@ -46,12 +46,33 @@ fi develop_branch="develop" main_branch="master" + +#DEBUG - copy out framework script +#this is necessary because the branch that these scripts are being developed on has not yet been merged into develop. This will not be necessary in production. +cp scripts/create_framework.sh ../create_framework.sh + +#stash any local changes to avoid errors during checkout +git status +prompt_user "Would you like to stash any local changes?" +if [[ $? == 1 ]]; then + # stash local changes to prevent issues with checkout + git stash + echo "use \"git stash pop\" when this script is complete to restore your changes" +fi + # Checkout develop -git checkout $develop_branch +# we need to checkout the branch before we start modifying files. +echo +echo "Checking out $develop_branch" +git -f checkout $develop_branch + +#DEBUG move framework script back in +#like above, this will not be required after the release script branch is merged into develop +mv ../create_framework.sh scripts/create_framework.sh # 1 bump version in projectFile echo -echo "Step 1: Update version in Project File" +echo "Updateing the version" # 1.1) get the current version and build from the podspec file project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" @@ -93,9 +114,9 @@ if [ $current_version != $new_version_number ]; then mv -f $pod_spec_new_file $pod_spec_file fi -# Step 2: Update RPC and protocol versions in /SmartDeviceLink/private/SDLGlobals.m +# 2 Update RPC and protocol versions in /SmartDeviceLink/private/SDLGlobals.m echo -echo "Step 2: Checking SDLGlobals.m for RPC and Protocol versions" +echo "Checking SDLGlobals.m for RPC and Protocol versions" file="SmartDeviceLink/private/SDLGlobals.m" current_rpc_version=$(sed -n '/SDLMaxProxyProtocolVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) current_protocol_version=$(sed -n '/SDLMaxProxyRPCVersion/{s/^.*@//;s/[\;]//;s/[\"]//g;p;q;}' $file) @@ -146,7 +167,6 @@ read user_input # 5 generate documentation -echo prompt_user "Would you like to automatically generate documentation with Jazzy" if [[ $? == 1 ]]; then # Check if Jazzy is already installed, and if not then install jazzy @@ -169,80 +189,89 @@ read user_input #record_url=https://www.github.com/smartdevicelink/rpc_spec #submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) +# git commands echo -echo "Please perform the following steps to set up the Github release." +echo "$develop_branch has already been checked out for you." -# git commands -# 7 commit release to develop -prompt_user "Would you like to commit and push these changes to the develop branch" +prompt_user "Would you like to automatically run the git commands for this release" if [[ $? == 1 ]]; then - # Add, commit, and push changes - git add -A - git commit -m "Update for release $new_version_number" - git push --set-upstream origin $develop_branch -fi + + # 7 commit release to develop + prompt_user "Would you like to commit and push these changes to the develop branch" + if [[ $? == 1 ]]; then + # Add, commit, and push changes + git add -A + git commit -m "Update for release $new_version_number" + git push --set-upstream origin $develop_branch + else + echo "Aborting script!" + exit 0 + fi -echo -# 8 merge release to master -prompt_user "Would you like to merge this release to master? (This will not push to master)" -if [[ $? == 1 ]]; then - # checkout master - git checkout $main_branch + # 8 merge release to master + prompt_user "Would you like to merge this release to master? (This will not push to master)" + if [[ $? == 1 ]]; then + # checkout master + git checkout $main_branch - # merge develop with master - git merge $main_branch $develop_branch + # merge develop with master + git merge $main_branch $develop_branch - echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." -fi + echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." + #git push --set-upstream origin $main_branch + else + echo "Aborting script!" + exit 0 + fi -echo -# 9 tag it -prompt_user "Would you like to tag this release with $new_version_number? (This will not push the tag)" -if [[ $? == 1 ]]; then - echo "Tag with version from above" - git tag $new_version_number - # IDEA - else condition that allows the user to enter a different tag -fi + # 9 tag it + prompt_user "Would you like to tag this release with $new_version_number? (This will not push the tag)" + if [[ $? == 1 ]]; then + echo "Tag with version from above" + git tag $new_version_number + # IDEA - else condition that allows the user to enter a different tag + fi -echo -# 10 merge master back to develop -prompt_user "Would you like to merge master back into develop (This will not push the branch)" -if [[ $? == 1 ]]; then - git merge $develop_branch $main_branch -fi + # 10 merge master back to develop + prompt_user "Would you like to merge master back into develop (This will not push the branch)" + if [[ $? == 1 ]]; then + git merge $develop_branch $main_branch + #git push --set-upstream origin $develop_branch + else + echo "Aborting script!" + exit 0 + fi -echo -# 11 Create new release for tag -prompt_user "Would you like to open to the Github releases page to create a release" -if [[ $? == 1 ]]; then - open "https://github.com/smartdevicelink/sdl_ios/releases" + # 11 Create new release for tag + prompt_user "Would you like to open to the Github releases page to create a release" + if [[ $? == 1 ]]; then + open "https://github.com/smartdevicelink/sdl_ios/releases" - # TODO - phase 4 - this can be automated with gh - # https://cli.github.com/manual/gh_release_create - # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) - # TODO - if/when we automate this, make sure to open the releases page so the user can review it. -fi + # TODO - phase 4 - this can be automated with gh + # https://cli.github.com/manual/gh_release_create + # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) + # TODO - if/when we automate this, make sure to open the releases page so the user can review it. + fi -echo -# 12 push new release to primary and secondary cocoapod using command line: -prompt_user "Would you like to push the release to CocoaPods" -if [[ $? == 1 ]]; then - pod trunk push SmartDeviceLink.podspec --allow-warnings - pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings + echo + # 12 push new release to primary and secondary cocoapod using command line: + prompt_user "Would you like to push the release to CocoaPods" + if [[ $? == 1 ]]; then + pod trunk push SmartDeviceLink.podspec --allow-warnings + pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings + fi fi -echo prompt_user "Would you like to create a binary xcframework for manual installation" if [[ $? == 1 ]]; then # create framework # we pass in the version so that the framework script does not need to ask - # remember the user will need to ahve permissions for the framework script - chmod u+x ./scripts/create_framework.sh #I don't know if this works? + # give the user permissions to the framework script, then run the script. + chmod u+x ./scripts/create_framework.sh ./scripts/create_framework.sh $new_version_number fi # 14 Rename the docset and pack it -echo prompt_user "Would you like to create a the docset" if [[ $? == 1 ]]; then # SmartDeviceLink-$new_version_number-docset.tgz @@ -253,7 +282,7 @@ if [[ $? == 1 ]]; then echo echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." read user_input - #todo - phase 4 - adding the docset to the release shoudl also be automatic + #todo - phase 4 - adding the docset to the release should also be automatic fi echo echo "Release complete." \ No newline at end of file -- cgit v1.2.1 From 7425e2bf4b31052c8ef5e85320a3aba10356a359 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 16:22:08 -0400 Subject: testing --- scripts/release.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/release.sh b/scripts/release.sh index 09e682f63..ece980752 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,5 +1,7 @@ #!/bin/bash +# this line is a change for testing purposes. + # George Miller # 05-17-2022 # If you don't have permission to run, try: chmod u+x release.sh @@ -58,6 +60,9 @@ if [[ $? == 1 ]]; then # stash local changes to prevent issues with checkout git stash echo "use \"git stash pop\" when this script is complete to restore your changes" +else + # dump local changes to prevent issues with checkout + git reset --hard fi # Checkout develop -- cgit v1.2.1 From 56dacc99e9b0af777de00412dc5f217c1b3a2449 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 16:23:57 -0400 Subject: testing --- scripts/release.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index ece980752..fd10fe2bb 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,7 +1,5 @@ #!/bin/bash -# this line is a change for testing purposes. - # George Miller # 05-17-2022 # If you don't have permission to run, try: chmod u+x release.sh -- cgit v1.2.1 From e0ebd4838a5d9f5cc4d1b574152877d870d3d0de Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 16:25:31 -0400 Subject: testing --- scripts/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index fd10fe2bb..e79d0e3f2 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -67,7 +67,7 @@ fi # we need to checkout the branch before we start modifying files. echo echo "Checking out $develop_branch" -git -f checkout $develop_branch +git checkout $develop_branch #DEBUG move framework script back in #like above, this will not be required after the release script branch is merged into develop -- cgit v1.2.1 From 00887ab77915bca527311d222d5225d19a26cf19 Mon Sep 17 00:00:00 2001 From: George Miller Date: Tue, 7 Jun 2022 16:36:12 -0400 Subject: removing cleanup script --- scripts/cleanup.sh | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100755 scripts/cleanup.sh diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh deleted file mode 100755 index e66178707..000000000 --- a/scripts/cleanup.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# the purpose here is to remove some files that may be created during testing of the framework script - -#process is that for each file, we check if it exists, and if it does, we nuke it - -# If we are running from the scripts directory, we want to pop back to the project root to do everything. -if [[ $PWD == *"scripts" ]]; then - cd .. -fi -# If, for some reason, we are not now in the correct working directory, exit -if [[ $PWD != *"sdl_ios" ]]; then - echo "Please run this from the sdl_ios project root or the sdl_ios/scripts directory" - exit 0 -fi - -# these show in finder as files, but show in Fork as folders -# bash aparently also sees them as folders -#SmartDeviceLink-Device.xcarchive -#SmartDeviceLink-Simulator.xcarchive - -#folders -folder="SmartDeviceLink-Device.xcarchive" -if [ -d "$folder" ]; then rm -r $folder; fi - -folder="SmartDeviceLink-Simulator.xcarchive" -if [ -d "$folder" ]; then rm -r $folder; fi - -# this one shouldn't exist, but just in case -folder="SmartDeviceLink.xcframework" -if [ -d "$folder" ]; then rm -r $folder; fi - - -# this is a file, but finder can open it like a folder -# also, the version in the middle changes. SO we'll use wildcard chars -#SmartDeviceLink-7.4.2.xcframework.zip - -#files -file_name="SmartDeviceLink-?.?.?.xcframework.zip" -if [ -f $file_name ]; then rm $file_name; fi -- cgit v1.2.1 From 3b989811ba43e0aa9ee33c8dc78918b5fa034011 Mon Sep 17 00:00:00 2001 From: George Miller Date: Wed, 8 Jun 2022 16:40:03 -0400 Subject: adjustments after review --- scripts/create_framework.sh | 36 ++++++----- scripts/release.sh | 142 ++++++++++++++++++++------------------------ 2 files changed, 81 insertions(+), 97 deletions(-) diff --git a/scripts/create_framework.sh b/scripts/create_framework.sh index 952e45adb..93796dc42 100755 --- a/scripts/create_framework.sh +++ b/scripts/create_framework.sh @@ -2,16 +2,16 @@ # George Miller # 07-07-2022 -# If you don't have permission to run, try: chmod u+x create_framework.sh +# If you do not have permission to run, try: chmod u+x create_framework.sh -# utility function for prompting the user Y/N -# takes in a string promt for the input -# returns 1 for yes/true or 0 for no/false +# A utility function for prompting the user Y/N +# This takes in a string prompt for the input +# This returns 1 for yes/true or 0 for no/false prompt_user() { user_input="g" echo - echo $1" (Y/N)" + echo $1" (Y/N)?" read user_input while [[ ! $user_input == [YyNn] ]]; do echo $1" (Y/N)?" @@ -24,7 +24,7 @@ prompt_user() { fi } -# 1 make sure we are in teh correct directory +# 1 Make sure we are in the correct directory # If we are running from the scripts directory, we want to pop back to the project root to do everything. if [[ $PWD == *"scripts" ]]; then cd .. @@ -36,17 +36,16 @@ if [[ $PWD != *"sdl_ios" ]]; then fi -# if there is no command line ask for a version number +# If there is no command line ask for a version number if [ -z $1 ]; then - # 2 get the verison number - # get the verison number - # at this point the version in the project file should be correct, so use it. + # Get the version number + # At this point the version in the project file should be correct, so use it. project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) if [ -z $current_version_number ]; then current_version_number="1.0.0"; fi echo "Current Version: "$current_version_number - # todo - we can streamline this by trusting the project file to always have the correct version (bail out if project file missing) + # TODO - we can streamline this by trusting the project file to always have the correct version (bail out if project file missing) prompt_user "Is this version correct" if [[ $? == 0 ]]; then # Prompt user for new version @@ -62,28 +61,28 @@ if [ -z $1 ]; then else new_version_number=$1 fi -# 3 Add a binary xcframework archive for manual installation with the following commands +# Add a binary xcframework archive for manual installation with the following commands echo echo "Creating a binary xcframework for manual installation" -# this builds the framework +# This builds the framework xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS' -archivePath './SmartDeviceLink-Device.xcarchive' SKIP_INSTALL=NO xcodebuild archive -project 'SmartDeviceLink-iOS.xcodeproj/' -scheme 'SmartDeviceLink' -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './SmartDeviceLink-Simulator.xcarchive' SKIP_INSTALL=NO xcodebuild -create-xcframework -framework './SmartDeviceLink-Device.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -framework './SmartDeviceLink-Simulator.xcarchive/Products/Library/Frameworks/SmartDeviceLink.framework/' -output './SmartDeviceLink.xcframework' -# todo - is there a way we can test that the build was successful. +# TODO - is there a way we can test that the build was successful. folder="SmartDeviceLink.xcframework" zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" -# kill the old zip if present. Useful for re-running the script +# Kill the old zip if present. Useful for re-running the script if [ -f $zip_file_name ]; then rm $zip_file_name; fi -# verify folder exists before acting on it. +# Verify folder exists before acting on it. if [ -d "$folder" ]; then zip $zip_file_name $folder # Check to see if the zip exists, and then remove old files. if [ -f "$zip_file_name" ]; then rm -r $folder; fi fi -#cleanup artifacts +# Cleanup artifacts folder="SmartDeviceLink-Device.xcarchive" if [ -d "$folder" ]; then rm -r $folder; fi @@ -91,6 +90,5 @@ folder="SmartDeviceLink-Simulator.xcarchive" if [ -d "$folder" ]; then rm -r $folder; fi echo -echo "The xcframework zip file was created at $zip_file_name. Please add it to the Github Release, then press enter..." -read user_input +echo "The xcframework zip file was created at $zip_file_name." diff --git a/scripts/release.sh b/scripts/release.sh index e79d0e3f2..e830d2808 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -2,13 +2,11 @@ # George Miller # 05-17-2022 -# If you don't have permission to run, try: chmod u+x release.sh -# numbering follows this document: https://github.com/smartdevicelink/sdl_ios/wiki/Release-Steps -# The numbering does restart halfway because the document does. +# If you do not have permission to run, try: chmod u+x release.sh -# a utility function for prompting the user Y/N -# takes in a string promt for the input -# returns 1 for yes/true or 0 for no/false +# A utility function for prompting the user Y/N +# This takes in a string prompt for the input +# This returns 1 for yes/true or 0 for no/false prompt_user() { user_input="g" echo @@ -25,10 +23,9 @@ prompt_user() { fi } -# TODO - phase 4 - github cli "gh" needs to be installed before we can use those commands. We could automate this or at least check if GH is installed. -# gh commands are commented for now. +# TODO - phase 4 - github cli "gh" needs to be installed before we can use those commands. We could automate this or at least check if gh is installed. -# script start +# Script start echo echo "Starting SDL release script..." @@ -42,48 +39,46 @@ if [[ $PWD != *"sdl_ios" ]]; then exit 0 fi -# setup branch variables +# Setup branch variables develop_branch="develop" main_branch="master" -#DEBUG - copy out framework script -#this is necessary because the branch that these scripts are being developed on has not yet been merged into develop. This will not be necessary in production. +# DEBUG - copy out framework script +# This is necessary because the branch that these scripts are being developed on has not yet been merged into develop. This will not be necessary in production. cp scripts/create_framework.sh ../create_framework.sh -#stash any local changes to avoid errors during checkout +# Stash any local changes to avoid errors during checkout git status -prompt_user "Would you like to stash any local changes?" +prompt_user "Would you like to stash any local changes" if [[ $? == 1 ]]; then - # stash local changes to prevent issues with checkout + # Stash local changes to prevent issues with checkout git stash echo "use \"git stash pop\" when this script is complete to restore your changes" else - # dump local changes to prevent issues with checkout + # Dump local changes to prevent issues with checkout git reset --hard fi # Checkout develop -# we need to checkout the branch before we start modifying files. +# We need to checkout the branch before we start modifying files. echo echo "Checking out $develop_branch" git checkout $develop_branch -#DEBUG move framework script back in -#like above, this will not be required after the release script branch is merged into develop +# DEBUG move framework script back in +# Like above, this will not be required after the release script branch is merged into develop mv ../create_framework.sh scripts/create_framework.sh -# 1 bump version in projectFile +# Bump version in projectFile echo -echo "Updateing the version" +echo "Updating the version" -# 1.1) get the current version and build from the podspec file +# Get the current version and build from the podspec file project_file="./SmartDeviceLink-iOS.xcodeproj/project.pbxproj" new_file="./SmartDeviceLink-iOS.xcodeproj/new.pbxproj" current_version_number=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) -current_build_number=$(sed -n '/CURRENT_PROJECT_VERSION/{s/CURRENT_PROJECT_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $project_file) echo "Current Version: "$current_version_number -echo "Current Build: "$current_build_number # Prompt user for new version echo "Enter the new version number (semantic versioning x.x.x format) or blank to skip: " @@ -117,7 +112,7 @@ if [ $current_version != $new_version_number ]; then mv -f $pod_spec_new_file $pod_spec_file fi -# 2 Update RPC and protocol versions in /SmartDeviceLink/private/SDLGlobals.m +# Update RPC and protocol versions in /SmartDeviceLink/private/SDLGlobals.m echo echo "Checking SDLGlobals.m for RPC and Protocol versions" file="SmartDeviceLink/private/SDLGlobals.m" @@ -128,31 +123,23 @@ echo "Current Protocol Version: "$current_protocol_version echo "If these are not correct, please update protocol versions in /SmartDeviceLink/private/SDLGlobals.m. Then press enter..." read user_input -# 3 Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. -# extract version and link from Package.swift +# Update to the newest BSON submodule. Update Package.swift and CocoaPods dependency files to point to latest if necessary. +# Extract version and link from Package.swift package_file="Package.swift" package_dependency_info="$(sed -n '/.package/{s/let package = Package(//;s/.package(//;s/)//;s/^[[:space:]]*//g;p;}' $package_file)" if [ ! -z "$submodule_info" ]; then - #loop through the dependencies + # Loop through the dependencies while IFS= read -r dependency_record ; do - # if the dependency_record in the dependancies is not empty (the first one usually is due to string interpretation of a list) + # If the dependency_record in the dependancies is not empty (the first one usually is due to string interpretation of a list) if [ ! -z "$dependency_record" ]; then - # identify the fields of the record + # Identify the fields of the record record_info="$(sed 's/,/\n/g' <<< $dependency_record)" record_name=$(sed -n '/name:/{s/name://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") record_url=$(sed -n '/url:/{s/url://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") record_version=$(sed -n '/from:/{s/from://g;s/^[[:space:]]*//g;s/"//g;p;}' <<< "$record_info") - - # figure out latest version (visit link?) - #dependency_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) - - # compare versions - #if [ $record_version != $dependency_latest_version ]; then - echo - echo "Current version of $record_name: "$record_version - #echo "Latest version of $record_name: "$dependency_latest_version - #fi + echo + echo "Current version of $record_name: "$record_version fi done <<< "$submodule_info" echo @@ -160,16 +147,16 @@ if [ ! -z "$submodule_info" ]; then read user_input fi -# 4 update changelog +# Update changelog # TODO - insert a template into the changelog that includes the version the users have selected above. -#echo "A template for this release has been inserted into the changelog. Please update it." +#echo "A template for this release has been inserted into the changelog. Please update it." echo echo "Please update CHANGELOG.md, then return here and press enter..." read user_input # TODO - check modified info before and after so we can detect if the user failed to update the file. -# 5 generate documentation +# Generate documentation prompt_user "Would you like to automatically generate documentation with Jazzy" if [[ $? == 1 ]]; then # Check if Jazzy is already installed, and if not then install jazzy @@ -178,28 +165,28 @@ if [[ $? == 1 ]]; then sudo gem install jazzy fi - # this runs Jazzy to generate the documentation + # This runs Jazzy to generate the documentation. echo "Running Jazzy to generate documentation..." jazzy --clean --objc --framework-root SmartDeviceLink --sdk iphonesimulator --umbrella-header SmartDeviceLink/public/SmartDeviceLink.h --theme theme --output docs fi -# 6 Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). +# Ensure that the RPC_SPEC has released to the master branch and update the submodule to point to the new release tag (or to the HEAD of master, if no release of the RPC_SPEC is occurring). echo echo "Please check if there is a new release of the RPC_SPEC on https://www.github.com/smartdevicelink/rpc_spec" echo "If there is, please update the rpc_spec submodule to point to the newest commit on the master branch. Press enter to continue..." read user_input -#TODO - phase ? - can this be automated. Check version here. Check version at site. +# TODO - phase ? - can this be automated. Check version here. Check version at site. #record_url=https://www.github.com/smartdevicelink/rpc_spec #submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) -# git commands +# Git commands echo echo "$develop_branch has already been checked out for you." -prompt_user "Would you like to automatically run the git commands for this release" +prompt_user "Would you like to walk through the git commands for this release" if [[ $? == 1 ]]; then - # 7 commit release to develop + # commit release to develop prompt_user "Would you like to commit and push these changes to the develop branch" if [[ $? == 1 ]]; then # Add, commit, and push changes @@ -211,13 +198,13 @@ if [[ $? == 1 ]]; then exit 0 fi - # 8 merge release to master + # merge release to master prompt_user "Would you like to merge this release to master? (This will not push to master)" if [[ $? == 1 ]]; then - # checkout master + # Checkout master git checkout $main_branch - # merge develop with master + # Merge develop with master git merge $main_branch $develop_branch echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." @@ -227,15 +214,14 @@ if [[ $? == 1 ]]; then exit 0 fi - # 9 tag it + # tag it prompt_user "Would you like to tag this release with $new_version_number? (This will not push the tag)" if [[ $? == 1 ]]; then - echo "Tag with version from above" git tag $new_version_number # IDEA - else condition that allows the user to enter a different tag fi - # 10 merge master back to develop + # merge master back to develop prompt_user "Would you like to merge master back into develop (This will not push the branch)" if [[ $? == 1 ]]; then git merge $develop_branch $main_branch @@ -244,38 +230,38 @@ if [[ $? == 1 ]]; then echo "Aborting script!" exit 0 fi +fi - # 11 Create new release for tag - prompt_user "Would you like to open to the Github releases page to create a release" - if [[ $? == 1 ]]; then - open "https://github.com/smartdevicelink/sdl_ios/releases" +# Create new release for tag +prompt_user "Would you like to open to the Github releases page to create a release" +if [[ $? == 1 ]]; then + open "https://github.com/smartdevicelink/sdl_ios/releases" - # TODO - phase 4 - this can be automated with gh - # https://cli.github.com/manual/gh_release_create - # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) - # TODO - if/when we automate this, make sure to open the releases page so the user can review it. - fi + # TODO - phase 4 - this can be automated with gh + # https://cli.github.com/manual/gh_release_create + # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) + # TODO - if/when we automate this, make sure to open the releases page so the user can review it. +fi - echo - # 12 push new release to primary and secondary cocoapod using command line: - prompt_user "Would you like to push the release to CocoaPods" - if [[ $? == 1 ]]; then - pod trunk push SmartDeviceLink.podspec --allow-warnings - pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings - fi +echo +# push new release to primary and secondary cocoapod using command line: +prompt_user "Would you like to push the release to CocoaPods" +if [[ $? == 1 ]]; then + pod trunk push SmartDeviceLink.podspec --allow-warnings + pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings fi -prompt_user "Would you like to create a binary xcframework for manual installation" +prompt_user "Would you like to create a binary xcframework adding to a Github release" if [[ $? == 1 ]]; then - # create framework - # we pass in the version so that the framework script does not need to ask - # give the user permissions to the framework script, then run the script. + # Create framework + # We pass in the version so that the framework script does not need to ask + # Give the user permissions to the framework script, then run the script. chmod u+x ./scripts/create_framework.sh ./scripts/create_framework.sh $new_version_number fi -# 14 Rename the docset and pack it -prompt_user "Would you like to create a the docset" +# Rename the docset and pack it +prompt_user "Would you like to create the documentation docset for adding to a Github release" if [[ $? == 1 ]]; then # SmartDeviceLink-$new_version_number-docset.tgz docset_directory="docs/docsets/" @@ -285,7 +271,7 @@ if [[ $? == 1 ]]; then echo echo "Please add the docset at $docset_tar_file_name to the Github release, then press enter..." read user_input - #todo - phase 4 - adding the docset to the release should also be automatic + # TODO - phase 4 - adding the docset to the release should also be automatic fi echo echo "Release complete." \ No newline at end of file -- cgit v1.2.1 From f228e6e1332ee394cc00b9652201d84f0a07f92a Mon Sep 17 00:00:00 2001 From: George Miller Date: Wed, 8 Jun 2022 16:44:02 -0400 Subject: removed some unused code --- scripts/release.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index e830d2808..2e5297734 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -175,9 +175,6 @@ echo echo "Please check if there is a new release of the RPC_SPEC on https://www.github.com/smartdevicelink/rpc_spec" echo "If there is, please update the rpc_spec submodule to point to the newest commit on the master branch. Press enter to continue..." read user_input -# TODO - phase ? - can this be automated. Check version here. Check version at site. -#record_url=https://www.github.com/smartdevicelink/rpc_spec -#submodule_latest_version=$(gh repo view $record_url --json latestRelease -q .latestRelease.tagName) # Git commands echo @@ -198,7 +195,7 @@ if [[ $? == 1 ]]; then exit 0 fi - # merge release to master + # Merge release to master prompt_user "Would you like to merge this release to master? (This will not push to master)" if [[ $? == 1 ]]; then # Checkout master @@ -208,24 +205,22 @@ if [[ $? == 1 ]]; then git merge $main_branch $develop_branch echo "Please check that everything is correct. Then, assuming you have permissions, push to master, then press enter..." - #git push --set-upstream origin $main_branch else echo "Aborting script!" exit 0 fi - # tag it + # Tag it prompt_user "Would you like to tag this release with $new_version_number? (This will not push the tag)" if [[ $? == 1 ]]; then git tag $new_version_number # IDEA - else condition that allows the user to enter a different tag fi - # merge master back to develop + # Merge master back to develop prompt_user "Would you like to merge master back into develop (This will not push the branch)" if [[ $? == 1 ]]; then git merge $develop_branch $main_branch - #git push --set-upstream origin $develop_branch else echo "Aborting script!" exit 0 @@ -236,15 +231,10 @@ fi prompt_user "Would you like to open to the Github releases page to create a release" if [[ $? == 1 ]]; then open "https://github.com/smartdevicelink/sdl_ios/releases" - - # TODO - phase 4 - this can be automated with gh - # https://cli.github.com/manual/gh_release_create - # TODO - can we pull the list of changes from Changelog.md and automatically add those to the release (so we do not type the same things twice) - # TODO - if/when we automate this, make sure to open the releases page so the user can review it. fi echo -# push new release to primary and secondary cocoapod using command line: +# Push new release to primary and secondary cocoapod using command line: prompt_user "Would you like to push the release to CocoaPods" if [[ $? == 1 ]]; then pod trunk push SmartDeviceLink.podspec --allow-warnings @@ -263,7 +253,6 @@ fi # Rename the docset and pack it prompt_user "Would you like to create the documentation docset for adding to a Github release" if [[ $? == 1 ]]; then - # SmartDeviceLink-$new_version_number-docset.tgz docset_directory="docs/docsets/" docset_tar_file_name="SmartDeviceLink-$new_version_number-docset.tgz" tar -czf $docset_tar_file_name $docset_directory -- cgit v1.2.1 From abc172414f30b6d2daae7bf6c150f353405f9ee5 Mon Sep 17 00:00:00 2001 From: George Miller Date: Wed, 8 Jun 2022 16:45:18 -0400 Subject: review edits --- scripts/release.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 2e5297734..79f6744e5 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -43,11 +43,6 @@ fi develop_branch="develop" main_branch="master" - -# DEBUG - copy out framework script -# This is necessary because the branch that these scripts are being developed on has not yet been merged into develop. This will not be necessary in production. -cp scripts/create_framework.sh ../create_framework.sh - # Stash any local changes to avoid errors during checkout git status prompt_user "Would you like to stash any local changes" @@ -66,10 +61,6 @@ echo echo "Checking out $develop_branch" git checkout $develop_branch -# DEBUG move framework script back in -# Like above, this will not be required after the release script branch is merged into develop -mv ../create_framework.sh scripts/create_framework.sh - # Bump version in projectFile echo echo "Updating the version" @@ -155,7 +146,6 @@ echo "Please update CHANGELOG.md, then return here and press enter..." read user_input # TODO - check modified info before and after so we can detect if the user failed to update the file. - # Generate documentation prompt_user "Would you like to automatically generate documentation with Jazzy" if [[ $? == 1 ]]; then -- cgit v1.2.1 From a375131dc5f205cd7668409c39d6597efc7c9a4a Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 9 Jun 2022 08:48:47 -0400 Subject: changes should stick --- scripts/create_framework.sh | 3 +-- scripts/release.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/create_framework.sh b/scripts/create_framework.sh index 93796dc42..a2731a7c9 100755 --- a/scripts/create_framework.sh +++ b/scripts/create_framework.sh @@ -90,5 +90,4 @@ folder="SmartDeviceLink-Simulator.xcarchive" if [ -d "$folder" ]; then rm -r $folder; fi echo -echo "The xcframework zip file was created at $zip_file_name." - +echo "The xcframework zip file was created at $zip_file_name." \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh index 79f6744e5..c3a739479 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -231,7 +231,7 @@ if [[ $? == 1 ]]; then pod trunk push SmartDeviceLink-iOS.podspec --allow-warnings fi -prompt_user "Would you like to create a binary xcframework adding to a Github release" +prompt_user "Would you like to create a binary xcframework for adding to a Github release" if [[ $? == 1 ]]; then # Create framework # We pass in the version so that the framework script does not need to ask -- cgit v1.2.1 From 66e80665e2f44aefbab3dd327d7de116cf2b105b Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 9 Jun 2022 08:58:26 -0400 Subject: framework prompt --- scripts/release.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/release.sh b/scripts/release.sh index c3a739479..443a24aa4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -238,6 +238,11 @@ if [[ $? == 1 ]]; then # Give the user permissions to the framework script, then run the script. chmod u+x ./scripts/create_framework.sh ./scripts/create_framework.sh $new_version_number + + echo + zip_file_name="SmartDeviceLink-$new_version_number.xcframework.zip" + echo "Please add the framework at $zip_file_name to the Github release, then press enter..." + read user_input fi # Rename the docset and pack it -- cgit v1.2.1 From 0301fdd8ff1757ee93190d20fb5a4b974f26bd73 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 9 Jun 2022 09:03:49 -0400 Subject: date typo --- scripts/create_framework.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create_framework.sh b/scripts/create_framework.sh index a2731a7c9..84d3f0a06 100755 --- a/scripts/create_framework.sh +++ b/scripts/create_framework.sh @@ -1,7 +1,7 @@ #!/bin/bash # George Miller -# 07-07-2022 +# 06-07-2022 # If you do not have permission to run, try: chmod u+x create_framework.sh -- cgit v1.2.1