Skip to content
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

Update release info #57

Merged
merged 17 commits into from
Feb 21, 2023
Merged

Update release info #57

merged 17 commits into from
Feb 21, 2023

Conversation

davidbuzinski
Copy link
Contributor

  • Update to store in tool cache with YEAR.A/B.UPDATE format
  • Get rid of Latest in mpm install command to fix Warning
  • Add mac support

src/matlab.ts Outdated Show resolved Hide resolved
src/matlab.ts Outdated Show resolved Hide resolved
src/matlab.ts Outdated
return Promise.reject(Error(`Unable to retrieve the MATLAB release information. Contact MathWorks at [email protected] if the problem persists.`));
}
} else {
let nameMatch = release.toLowerCase().match(/r[0-9]{4}[a-b]/);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't allowing users to specify update level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are, we just pull the release name and the update level out separately

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to warn if formatting is invalid. Using latest as default in this case

src/matlab.ts Outdated
// Notify user if Update version format is invalid
if (release.trim() !== name) {
const invalidUpdate = release.replace(name, "");
core.info(`Update version ${invalidUpdate} is invalid. Defaulting to latest update.`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mw-hrastega Would appreciate some feedback on this info message. For context: This is what we show users if they add an update version to their release in an invalid format.

For example, mpm requires format like R2021aU2 for R2021 update 2. If they put R2021aUpdate2 or R2021aSomeNonsense they will see this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this?

Defaulting to the latest update release because ${} is not a valid release name.

Reference page: https://www.mathworks.com/help/matlab/ref/matlabrelease.html

src/matlab.ts Outdated
// Notify user if Update version format is invalid
if (release.trim() !== name) {
const invalidUpdate = release.replace(name, "");
core.info(`Defaulting to the latest update release because ${invalidUpdate} is not a valid update release name.`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider making this an error rather than a warning because it will be easily missed in a CI log.

src/matlab.ts Outdated
// Notify user if Update version format is invalid
if (trimmedRelease !== name && trimmedRelease !== "latest") {
const invalidUpdate = trimmedRelease.replace(name, "");
return Promise.reject(Error(`Defaulting to the latest update release because ${invalidUpdate} is not a valid update release name.`));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer defaulting to latest if this is now an error right?

Copy link
Member

@mcafaro mcafaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@davidbuzinski davidbuzinski merged commit 180c8e5 into mpm Feb 21, 2023
@davidbuzinski davidbuzinski deleted the update-release-info branch February 21, 2023 15:59
davidbuzinski added a commit that referenced this pull request Feb 6, 2024
* Invoke installer for private repo support

* Disable automatic activation

* Fix failing unit test to account for addition call

* Add environment variables to workflow

* Disable R2020a workflow; only R2020b for now

* Build 82c7ee1

* Build for v1.0.1

* Remove -r from BaT workflow

* First change

* Use mpm

* Update action.yml

* Update bat.yml

* Update install.ts

* Add to path

* Update index.ts

* Pass in products

* Add products input

* Update bat.yml

* Cache installs

* Update bat.yml

* Update install.ts

* Update install.ts

* Update install.ts

* Update install.ts

* Enable caching

* Cache in the right place

* Print the key

* More display tweaks

* Get the key right

* Cache

* merge changes for v2-beta (#50)

* v2-beta bugfix (#52)

* adding tests to catch bugs

* updating unit tests and source code

* updating workflow to use 2nd release

* fixing update level logic

* update level deps script workaround

* testing no-op on existing install

* add output

* Update bat.yml

* Update bat.yml

* Update bat.yml

* Update src/matlab.ts

Co-authored-by: Mark Cafaro <[email protected]>

* Update matlab.Release and removed usExisting from destination

* updated release info to fix inconsistency

* changed output name to matlabroot

* fixng pipeline syntax

* missing colon in yml

* updating naming and fixing missing simulink in bat workflow

* changing some variable names for clarity

Co-authored-by: Mark Cafaro <[email protected]>

* Update release info (#57)

* Restrict supported releases (#65)

* Add cache input to leverage Github Actions cache for v2 (#73)

* added cache-save and updated build. TODO: cache-restore

* added cache restore

* fixing release type conversion and bool type conversion

* add unit tests

* fixing path and cache hit issues

* add architecture to cache key and fix description

* addressed review feedback

* updated MatlabPath state 'type'

* updated missed copyrights

* changing back latest URL

* update cache input description

* Fix mpm mac windows v2-beta (#77)

* no more unzip mpm

* test no windows

* update url

* try with .exe extension?

* fail slow

* update url

* try cacheFile to fix file location

* take out bad secrets

* undo bad string interp

* trying fix linux mac

* use runcommand

* use runcommand

* try to specify directory

* error if no runner temp found

* Updated to check if sudo command is available

* Add tests

* Switch to registry.npmjs.org

* Clean up change

* Update copyright

* Update to check if which returns empty string

* merge rc0 changes to mpm branch (#83)

* initial commit

* npm audit fix

* add batch to tc

* chmod matlab-batch

* rearranging chmod

* still wrangling chmod

* remove pct

* remove PCT from defaults

* update tests

* cache fix for support packages

* make sure support packages path is in cachePaths if defined

* add log for supportPackagesPath

* capitalize release dir

* had wrong default dir

* testing windows thing

* remove log. use tmpdir for windows

* applying mpm fixes for mac & windows

* initial commit

* npm audit fix

* add batch to tc

* chmod matlab-batch

* rearranging chmod

* still wrangling chmod

* remove pct

* remove PCT from defaults

* update tests

* cache fix for support packages

* make sure support packages path is in cachePaths if defined

* add log for supportPackagesPath

* capitalize release dir

* had wrong default dir

* testing windows thing

* remove log. use tmpdir for windows

* applying mpm fixes for mac & windows

* Merge windows optimization to v2-rc0

* improve os specific cache dir implemenation

* try to link after install

* symlink wrong direction?

* update toolcache impl

* forgot .keep

* forgot dist

* fix typo

* debug

* more debug idk

* forgot recursive

* seeing whatever is going on with .complete file

* add tests for windows toolcache optimization

* prep for merge

* one more update before merge

* Update bat.yml to v2-rc0 for build until release

* address sam's feedback

* address mark's feedback

* fix error message

* switch statement sugar

Co-authored-by: Mark Cafaro <[email protected]>

* Accept any number of spaces in product list

Co-authored-by: Mark Cafaro <[email protected]>

---------

Co-authored-by: sameagen <[email protected]>
Co-authored-by: Mark Cafaro <[email protected]>

* Update action node version (#84)

* init update

* update bat.yml

* update bat.yml

* review comments

* updating README in preparation for matlab-actions/setup-matlab@v2 (#88)

* Update README.md

replacing v1 with v2

* removing text on platform restrictions

* replacing a verb

* updating the action description

* replacing 20b with 21a

* updating products description

* updating the cache description

* adding a placeholder section

* adding missing trademark symbol

* update the first example description

* removing a code block

* updating the last example description

* addressing review feedback

* Fix a typo.

Co-authored-by: Mark Cafaro <[email protected]>

---------

Co-authored-by: Mark Cafaro <[email protected]>

---------

Co-authored-by: Johan Pereira <[email protected]>
Co-authored-by: Andy Campbell <[email protected]>
Co-authored-by: Mark Cafaro <[email protected]>
Co-authored-by: sameagen <[email protected]>
Co-authored-by: sameagen-MW <[email protected]>
Co-authored-by: mw-hrastega <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants