Adding processing for new label property 'folderName', adds chemdoodle label#783
Closed
bartreardon wants to merge 0 commit intoInstallomator:mainfrom
Closed
Adding processing for new label property 'folderName', adds chemdoodle label#783bartreardon wants to merge 0 commit intoInstallomator:mainfrom
bartreardon wants to merge 0 commit intoInstallomator:mainfrom
Conversation
Collaborator
Author
|
oh - it added the last commit to this pr....was hoping to make that a seperate pr. :/ |
Collaborator
|
Wow, these last changes are for me. Correcting |
Collaborator
Author
|
Can do 🙂 - although |
Collaborator
Author
|
Found a bug in the chemdoodle labels introduced as the vendor has updated their download page somewhat. the downloadURL should work correctly now. |
Collaborator
Author
|
I need to re-submit this PR - too many files got added to other branches and it was a pain to try and keep things in check. |
Collaborator
Author
|
oh wait - I don't need to as that is included here. didn't realise it was merged in ed83af9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This update allows for cases where the app is within a folder within a DMG where the distribution requires the parent folder containing the app needs to be copied to the destination, not just the app itself (should also work for ZIP but I haven't come across an example where this would be required).
Example:
AppName.dmgwhen mounted contains a folderAppFolderNamewhich contains the app bundle but also other related content (companion apps, settings etc)When mounted the folder structure will be
/Volumes/AppName/AppFolderName/AppName.appThis change will let you specify
AppFolderNamein the label. Verification will still occur onAppName.appafter whichAppFolderNameand its contents will be copied into place.Changes are:
folderNameinstallAppWithPathto take afolderPathargument. Will still perform all the same checks on$appPathbut instead ofditto -v "$appPath"to install the app it performsditto -v "$folderPath"installFromDMG()updated to handlefolderPathAs written,
installFromDMGwill always pass in two arguments toinstallAppWithPath. The check ininstallAppWithPathwill verify if it has an actual value or"$dmgmount/with no folder path by looking for a trailing/. Optionally could makeinstallFromDMGonly pass the argument if required but we are doing the verification anyway.Also, this change will preserve removing of the app bundle if an earlier version exists, but does not remove the parent folder. This is partially intentional as there may be app configuration however it may be desirable to either allow (or explicitly disallow) removal of the parent folder during an update. In testing the current behaviour didn't present an issue though.
Included in the PR is a label for an app where this is the case (ChemDoodle) but the format would look something like:
applabel) name="AppName" type="dmg" downloadURL="https://some/url/AppName.dmg" expectedTeamID="ABC1234" folderName="AppFolderName" appName="${folderName}/AppName.app" appNewVersion=$(...) ;;Tested with ChemDoodle and also verified this should not break any existing functionality (not in the labels I tested at least)