-
Notifications
You must be signed in to change notification settings - Fork 2
Mac Installer + Reorganized GithubAction Release archives[CPP-326][CPP-419] #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ced7fb3 to
8890f51
Compare
8890f51 to
6971d58
Compare
| INSTALLER_ARCHIVE=$(find installers/Windows -maxdepth 1 -iname "*.exe") | ||
| elif [ "$RUNNER_OS" == "macOS" ]; then | ||
| mv installers/macOS/*.dmg . | ||
| INSTALLER_ARCHIVE=$(find . -maxdepth 1 -iname "*.dmg") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mv command seems to be necessary for mac? Otherwise the final archive contains the "installers/macOS" folder structure unlike Linux/Windows 🤷
| exec --fail-on-error cp -r py39-dist "${contents_mac_os}" | ||
| exec --fail-on-error mv ./${contents_mac_os}/${app_original_name} "./${contents_mac_os}/${app_file_prefix}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to resort to exec commands here because for the life of me I could not figure out how to rename folders. The default duckscript commands seemed to place which ever folder into the folder provided as the target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine since this is mac specific
| echo "INSTALLER_ARCHIVE=$INSTALLER_ARCHIVE" >>$GITHUB_ENV | ||
| if: matrix.os != 'macos-10.15' && github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
| echo $INSTALLER_ARCHIVE >installer-archive.filename | ||
| echo "INSTALLER_ARCHIVE=$(cat installer-archive.filename)" >>$GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's this line necessary? Seems redundant (line 298 should emit exactly the same text).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. Good catch!
Makefile.toml
Outdated
| ''' | ||
|
|
||
| [tasks.dist-to-installer.mac] | ||
| env = { TMP_DIR = "target/installer", CONTENTS_MACOS_DIR = "MacOS", CONTENTS_RESOURCES_DIR = "Resources", APP_FILE_PREFIX = "Swift-Navigation-Console", APP_ORIGINAL_NAME = "console", VERSION_PATH = "console_backend/src/version.txt", INFO_PLIST_PATH = "installers/macOS/Info.plist", ICNS_PATH = "installers/macOS/icon.icns", BACKGROUND_PATH = "resources/images/LogoBackground.jpg", FINAL_DIR = "installers/macOS" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the toml formatter let us put this on multiline lines somehow? This seems pretty difficult to read at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it looks like the toml formatter does not clean this up at all and the cargo make as far as I can tell does not offer a newline delimited option for task specific environment variables. Instead I created a separate task that defines the variables which looks better. However I tried reducing the command for creating the dmg but newlines wouldn't work nor storing the arguments in an array or string unfortunately.
| exec --fail-on-error cp -r py39-dist "${contents_mac_os}" | ||
| exec --fail-on-error mv ./${contents_mac_os}/${app_original_name} "./${contents_mac_os}/${app_file_prefix}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine since this is mac specific
ce07adf to
a5d10f0
Compare
|
I just ran the MacOS installer and it worked perfectly 🎉 |
M1 certified and Monterey certified I guess then? Not too shabby! |
A test release with the installers:
https://github.com/swift-nav/swift-toolbox/releases/tag/0.12.0-test