-
Notifications
You must be signed in to change notification settings - Fork 2
Rename vars #15
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
Rename vars #15
Conversation
Make it easier to re-use scripts for another installer. If we went further down this line, we would likely have to rename `construct.yaml` to `construct.yaml.tpl` and similarly for files in `assets`, then fill those Jinja template files from a master variable `.yaml` file like `config.yaml`. But perhaps that can wait for another day.
f66f6a0 to
35e8031
Compare
.github/workflows/build.yml
Outdated
| # These names should correspond to PKG_INSTALLER_ARTIFACT_ID in tools/extract_version.sh | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: ${{ env.PROJECT_NAME }}-Python-* |
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 line looks off to me, why the trailing -Python- before the *?
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.
Fixed.
| $PERMS mv "$APP_DIR"/Scientific\ Python\ *.app "$SPI_APP_DIR"/ | ||
| logger -p 'install.info' "ℹ️ Moving root project .app bundles from $APP_DIR to $PKG_APP_DIR." | ||
| # Set this to match the names generated from the menu package. | ||
| $PERMS mv "${APP_DIR}"/Scientific\ Python\ *.app "$PKG_APP_DIR"/ |
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.
Just so I'm clear: it isn't possible to remove Scientific\ Python here too? IIUC this is for all the menu items, and there's no guarantee that they'll always have a nice clean prefix that glob-matches all of them... but in our case there is (by design). So in theory we could use a variable here for our installer, but it wouldn't generalize for use cases where the menu items have arbitrary names. Is that right?
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.
That's right - because we have the custom names in construct.yaml as you've described, it would work for us, but not for any other names someone chose. We could do all this by templating and filling out the templates in a pre-build step, but perhaps we could leave that for another time.
| logger -p 'install.info' "ℹ️ Setting custom folder icon for $SPI_APP_DIR and $SPI_APP_DIR_ROOT to $SPI_ICON_PATH." | ||
| for destPath in "$SPI_APP_DIR" "$SPI_APP_DIR_ROOT"; do | ||
| logger -p 'install.info' "ℹ️ Setting custom folder icon for $destPath to $SPI_ICON_PATH." | ||
| PKG_ICON_PATH="${PREFIX}/Menu/spi_mac_folder_icon.png" |
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 wonder if we should genericize the image names too, to remove the spi_ prefix (maybe in a follow-up PR?)
|
|
||
| echo "::group::spi_sys_info" | ||
| python -u ${SP_INSTALL_PREFIX}/Menu/spi_sys_info.py nohtml | ||
| python -u ${PKG_INSTALL_PREFIX}/Menu/spi_sys_info.py nohtml |
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.
ditto here re: spi_ in filenames (not an image, but same logic may apply)
| # Now extract the package and check that the _conda binary is | ||
| # properly signed as well | ||
| pkgutil --expand-full ${SP_INSTALLER_NAME} ./sp-extracted | ||
| pkgutil --expand-full ${PKG_INSTALLER_NAME} ./sp-extracted |
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.
another sp- here... maybe ./pkg-extracted?
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.
Done, and generalized the name below that.
a25c423 to
ad06ec8
Compare
Rename various variables to generalize package name. Not complete, but at least closer.