Commit Graph

639 Commits

Author SHA1 Message Date
Janne Valkealahti
bb7afdf10f Configure build-info for sample
- e2e tests version command fails without build-info.
- Relates #470
2022-08-17 09:28:38 +01:00
Janne Valkealahti
212ee43989 Change e2e tests for gradle changes
- Fix e2e workflow to build with gradle.
- Fix e2e paths to ones generated by gradle.
- Relates #470
2022-08-17 08:52:19 +01:00
Janne Valkealahti
fee09f9ff5 Integration native build to sample
- This adds a way to build native binary for a sample which
  were missed from original gradle work.
- Relates #470
2022-08-17 08:45:31 +01:00
Janne Valkealahti
2173c9bf84 Change management deps to be constraints
- Looks like if plain deps are not defined as constraints test
  deps will leak into a fatjar build i.e. with sample.
- Change it how its done in spring security where this idea
  was taken.
- Remove use of maven-publish plugin which is not needed.
- Relates #470
2022-08-17 08:42:51 +01:00
Janne Valkealahti
891e1e17ef Polish 2022-08-16 15:08:31 +01:00
Janne Valkealahti
c1c1da84db Remove maven build
- Relates #470
2022-08-16 12:48:04 +01:00
Janne Valkealahti
dfb931c2ee Config jfrog to use plugin
- Relates #470
2022-08-16 12:33:51 +01:00
Janne Valkealahti
19902ed021 Add missing runs-on to ci workflow
- Relates #470
2022-08-16 12:08:46 +01:00
Janne Valkealahti
a45e0abf58 Change ci workflow to use gradle
- Relates #470
2022-08-16 12:06:53 +01:00
Janne Valkealahti
39c4519a3f Add gradle build files
- First set of changes for introduction of a gradle build.
- Relates #470
2022-08-16 10:30:15 +01:00
Janne Valkealahti
a143d25ffc Apply correct completion
- This commit fixes two issues.
- Firstly complete with correct option as existing bug was
  to wrongly always complete with first option which used
  wrong provider.
- Secondly filter out duplicate option proposals giving better
  result when options is already in place.
- Fixes #495
2022-08-04 09:08:11 +01:00
Thibaut Gautier
23194d05e2 Fix ShellMethod not using context validator 2022-08-02 09:50:46 +01:00
Janne Valkealahti
1ff802d8e0 Add recorded jni-config for windows in sample
- While out of a box *nix don't need spesific native config as is,
  windows is a different story as it needs jna/jansi stuff and i.e.
  jna needs jvm native things which doesn't work without correct
  graal configs.
- Relates #490
2022-07-29 16:24:40 +01:00
Janne Valkealahti
291e93c9b6 Downgrade maven plugins
- Attempt to get poms published as locally this change
  did work. This would anyway be temporary fix as at some
  point we move over to gradle.
- Relates #486
2022-07-28 08:10:23 +01:00
Janne Valkealahti
b21ecdc358 Upgrade setup-jfrog-cli 2.21.5 2022-07-27 08:47:20 +01:00
Janne Valkealahti
ac520b7aa0 Upgrade setup-jfrog-cli 2.3.0 2022-07-27 08:20:47 +01:00
Janne Valkealahti
abbddae0b5 Upgrade graal 22.2.0 in workflows 2022-07-26 14:07:34 +01:00
Janne Valkealahti
98718286d9 Change profile for native sample
- Now using nativex instead of native due to change in
  boot plugin.
2022-07-26 13:35:44 +01:00
Janne Valkealahti
e193ca1d24 Upgrade to Boot 3.x
- For now port spring-native to framework config.
- 3rd party configs should go somewhere else.
- Fix changes from javax to jakarta.
- Change java settings as we now require jdk 17.
- Fixes #385
2022-07-24 08:07:14 +01:00
Janne Valkealahti
218abd7095 Update readme
Notes about main now that we're starting boot 3 dev.
2022-07-23 16:04:21 +01:00
Janne Valkealahti
bff7a22b5e Next major development version 2022-07-23 15:57:21 +01:00
Janne Valkealahti
f826f29d77 Next development version 2022-07-23 15:15:17 +01:00
Janne Valkealahti
000ff981da Add pom fields required by central 2022-07-23 14:57:42 +01:00
Janne Valkealahti
dc4dab82f3 Polish release notes template 2022-07-23 07:38:13 +01:00
Janne Valkealahti
690d1d2e62 Add commands as list in help templating
- Add getNames method.
- Add docs for templating info and fields to help.
- Fixes #480
2022-07-21 21:24:41 +01:00
Janne Valkealahti
416700b10b Upgrade to Spring Boot 2.7.2
- Fixes #477
2022-07-21 14:09:36 +01:00
Janne Valkealahti
153f9e70a2 Fix tests
- Take2
- Relates to changes in #476
2022-07-20 10:10:58 +01:00
Janne Valkealahti
0fd67f2fad Fix tests
- Relates to changes in #476
2022-07-20 09:29:32 +01:00
Janne Valkealahti
d81e2614e3 Fix styling issue
- For title styling change from bold,fg:bright-white
  to bold which should work better with different
  terminal color settings as forcing it into bright white
  is a bad idea.
- Fixes #476
2022-07-20 09:01:05 +01:00
Drevsh
2862cc855e Add default selection to MultiItemSelector
- Added default selection to items
- Added correct styling for disabled but default selected item
- Added missing license header
- Added missing javadoc
- Added default selection to sample/doc code
2022-07-20 08:17:24 +01:00
Janne Valkealahti
329c7eb559 Add central sync to ga workflow
- Relates #454
2022-07-19 17:14:54 +01:00
Janne Valkealahti
643b189fb8 Default boolean arg to false
- In a case where arg is given as boolean and with plain
  @ShellOption (user doesn't define defaults), configure
  arg not to be mandatory and with default value false.
- This brings this spesific case more close how it behave
  in older shell version.
- Having `@ShellOption boolean arg1` it now works as:
    my-shell:>e2e reg default-value-boolean3
    Hello false
    my-shell:>e2e reg default-value-boolean3 --arg1
    Hello true
    my-shell:>e2e reg default-value-boolean3 --arg1 false
    Hello false
    my-shell:>e2e reg default-value-boolean3 --arg1 true
    Hello true
- Fixes #461
2022-07-18 12:41:23 +03:00
Janne Valkealahti
5ba8e185bc Fix method argument without ShellOption
- For annotated methods with arguments, change default arity
  to zero with booleans and one everything else regardless
  if @ShellOption is defined or not.
- OptionArity.ZERO_OR_ONE had wrong upperbound value, change
  from MAX to 1.
- These modification should take us a bit closer to old
  shell functionality and what ShellOption documents for arity.
- For old functionality I'm referring to method
  `add(int a, int b)` and/or having @ShellOption and/or without
  arity setting.
- Fixes #446
2022-07-14 20:21:52 +01:00
Janne Valkealahti
c9cea37cf0 Add ga release workflow
- Fixes #454
2022-07-14 17:27:07 +01:00
Leszek Jasek
0edc9ada38 Fix typos in using-shell-options-optional.adoc 2022-07-14 19:18:50 +03:00
Janne Valkealahti
06d9fd51b2 Fix alias usage in help command
- Add info about aliases into model structure used by help
  command templating.
- Add some tests to models.
- Change help commands list to group command and its aliases together.
- Change help command to show aliases.
- Fixes #458
- Fixes #426
2022-07-14 19:17:37 +03:00
Janne Valkealahti
d88849dfa9 Separate commit and push in release workflow
- Fixes #452
2022-07-07 08:53:10 +01:00
Janne Valkealahti
932e9d5d75 Update docs
- Completion docs
- Relates #433
2022-07-07 08:09:23 +01:00
Janne Valkealahti
03a02a0615 Flatten docs structure
- Essentially remove "Using Spring Shell" and move
  its content one level up.
- Fixes #433
2022-07-06 09:36:36 +01:00
Janne Valkealahti
32f77c1917 Rework completion interfaces
- Use same interface type in a generic interactive completions
  in a method level and option value level.
- Change CompletionResolver to have same function signature
  as with options and use CompletionContext to keep
  relevant information.
- Fixes #449
2022-07-06 09:02:06 +01:00
Janne Valkealahti
2520e0681f Rework theme sample
- Rename class and commands.
- Changes mostly to make it easier to test things
  out manually when following theming docs.
- Relates #433
2022-07-04 09:53:50 +01:00
Janne Valkealahti
8fc3ff9c6d Update docs
- Some new docs for theming.
- Relates #433
2022-07-04 09:47:39 +01:00
Janne Valkealahti
5eaa5dd093 Implement interactive completion
- This is a re-implementation of a interactive completion
  with breaking changes as it moves away from a direct use
  of a MethodParameter in favour of a CommandRegistration
  and its option definitions.
- Fixes #449
2022-06-28 14:10:23 +03:00
Janne Valkealahti
341a69e6e0 Add e2e test for command help 2022-06-15 18:47:06 +01:00
Janne Valkealahti
eb2d351b33 Fix native for availability
- Relates to #423
2022-06-15 18:46:20 +01:00
Janne Valkealahti
195d1d00ab Components can't use interactive mode without tty
- Adding a concept of no-tty which in this commit simply
  tracks DumbTerminal as jline creates that if there nothing
  better.
- For components without tty don't go to interaction loop.
- For new sample show that we can at least manually handle
  required option with a flow while command option is not
  required.
- Fixes #444
2022-06-15 09:56:14 +01:00
Janne Valkealahti
a019934169 Update docs
- Document option label
- Relates #433
2022-06-14 21:25:01 +01:00
Janne Valkealahti
088c4267b5 Update docs
- Polish getting started
- Relates #433
2022-06-14 21:07:17 +01:00
Janne Valkealahti
189794b0ef Update docs
- Remove and fix content with wrong links.
- Relates #433
2022-06-14 20:01:52 +01:00
Janne Valkealahti
39c01fe00b Fix availability feature
- Bring back some missing functionality which got missing
  during the rework to new command model.
- Polish some classes.
- Restore origin sample.
- Add availability things into help templates and its
  representation model.
- Fixes #423
2022-06-14 11:51:50 +01:00