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

Add "overwrite-settings" input parameter #136

Merged
merged 6 commits into from
Mar 17, 2021

Conversation

maxim-lobanov
Copy link
Contributor

@maxim-lobanov maxim-lobanov commented Mar 16, 2021

Description:
In some scenarios there's already a valid Maven settings file which shouldn't or cannot be overwritten by actions/setup-java.

The overwrite-settings (default: true) configuration setting enables users to disable the generation of the Maven settings file by actions/setup-java.

This pull-request was inspired by #82, just adopt changes to V2-preview branch.

Included changes:

  • Add overwrite-settings input
  • Add e2e and unit tests to cover new logic
  • Implement getBooleanInput util func based on https://github.com/actions/checkout/blob/main/src/input-helper.ts#L118
  • Move logic to read settingsDirectory to configureAuthentication function to have all related logic at the same place.
  • Update README to include usage example for both Zulu and Adopt

Related issue:
Closes #79

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@maxim-lobanov maxim-lobanov changed the base branch from main to v2-preview March 16, 2021 09:25
@maxim-lobanov
Copy link
Contributor Author

cc: @MaksimZhukov @dmitry-shibanov @vsafonkin @AlenaSviridenko to review this pull-request

@maxim-lobanov maxim-lobanov marked this pull request as ready for review March 16, 2021 10:02
src/auth.ts Outdated Show resolved Hide resolved
@maxim-lobanov maxim-lobanov merged commit 804a60f into v2-preview Mar 17, 2021
@maxim-lobanov maxim-lobanov deleted the add-override-settings branch March 25, 2021 11:56
maxim-lobanov added a commit that referenced this pull request Apr 5, 2021
* actions/setup-java@v2 - Support different distributions (#132)

* Implement support for custom vendors in setup-java

* minor improvements

* minor refactoring

* Add unit tests and e2e tests

* Update documentation for setup-java@v2 release

* minor improvements

* regenerate dist

* fix comments

* resolve comments

* resolve comments

* fix tests

* Update README.md

Co-authored-by: George Adams <george.adams@microsoft.com>

* Apply suggestions from code review

Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

* fix minor nitpicks

* handle 4th digit

* pull latest main

* Update README.md

* rename adoptium to adopt

* rename adoptium to adopt

* rename adoptium to adopt

* Update README.md

* make java-version and distribution required for action

* update readme

* fix tests

* fix e2e tests

Co-authored-by: George Adams <george.adams@microsoft.com>
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

* Add "overwrite-settings" input parameter (#136)

* add overwrite-settings parameter

* fix e2e tests

* print debug

* fix e2e tests

* add comment

* remove comment

* Add "Contents/Home" postfix on macOS if provider creates it (#139)

* Update e2e-versions.yml

* Update e2e-versions.yml

* implement fix

* Update e2e-versions.yml

* Update installer.ts

* fix filter logic

* Update e2e-versions.yml

* remove extra logic

* Update e2e-versions.yml

* Add check-latest flag (#141)

* add changes for check-latest

* run prerelease script

* resolving comments

* fixing tests

* fix spelling

* improve core.info messages

* run format

* run prerelease

* change version to fix test

* resolve comment for check-latest

* Update README.md

* added hosted tool cache section

* Apply suggestions from code review

Co-authored-by: Maxim Lobanov <v-malob@microsoft.com>
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>

* Avoid "+" sign in Java path in v2-preview (#145)

* try to handle _ versions

* more logs

* more debug

* test 1

* more fixes

* fix typo

* Update e2e-versions.yml

* add unit-tests

* remove debug info from tests

* debug pre-cached versions

* change e2e tests to ubuntu-latest

* update npm licenses

Co-authored-by: George Adams <george.adams@microsoft.com>
Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
Co-authored-by: Dmitry Shibanov <dmitry-shibanov@github.com>
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.

5 participants