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

Advanced configuration #108

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Advanced configuration #108

merged 2 commits into from
Apr 14, 2023

Conversation

sstok
Copy link
Member

@sstok sstok commented Mar 20, 2023

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Tickets
License MIT

The allows for a more advanced configuration, mainly per branch configuration and a local configuration file.

  • Configuration is now validated using the Symfony Config component
  • Per branch configuration (requires schema-version 2 is used)
  • Local configuration usage for easier management (requires schema-version 2 is used in the main config file)
    Stored in a special branch named "_hubkit".

The per branch configuration allows defining a default configuration, per branch
and version ranges by allowing regexp.

Existing configurations will continue to work but will not be supported in Hubkit v2.0

This 'little' change makes it possible to introduce a much bigger feature.
@sstok sstok added the Feature label Mar 20, 2023
@sstok sstok force-pushed the feature/advanced-config branch 7 times, most recently from 89ece76 to 717a318 Compare March 23, 2023 15:03
@sstok
Copy link
Member Author

sstok commented Apr 3, 2023

Keeping a local configuration file might cause some trouble when switching branches, where the new configuration might be expected. To solve this it might be an idea to use a special _hubkit branch to keep configurations (and scripts for special operations).

@sstok
Copy link
Member Author

sstok commented Apr 7, 2023

Local configuration is now stored in a special branch named "_hubkit", the configuration is loaded once (using a special temporary repository) and it not effected by branch switching.

This new config branch can also be used in the future to keep special hook scripts for upmerge for example, as the script can be executed without the need to keep this in the lowest possible branch.

@sstok sstok force-pushed the feature/advanced-config branch 13 times, most recently from 816eb59 to c036530 Compare April 9, 2023 19:34
In addition to the previous commit this provides a near complete rewrite of configuration
handling.

- Configuration is now validated using the Symfony Config component
- Per branch configuration (requires schema-version 2 is used)
- Local configuration usage for easier management (requires schema-version 2 is used in the main config file)
   Stored in a special branch named "_hubkit".
   Use the newly added commands to initialize the configuration 'share' the upstream repository

The per branch configuration allows defining a default configuration, per branch
and version ranges by allowing regexp.

Existing configurations will continue to work but will not be supported in Hubkit v2.0

Show local repository info in self-diagnose

- Shows the (resolved) configuration for the local repository
- Whether configuration was local or if the _hubkit branch exists but no config.php file was found
- Return proper status (0: OK, 1: error)
@sstok
Copy link
Member Author

sstok commented Apr 13, 2023

OK. I'm finally done! I added two additional commands to initialize the configuration (importing any existing configuration to ease the transition) and another one to synchronize the configuration with the upstream (pull/push/rebase when diverged).

All and all I'm really pleased with this feature!

@sstok sstok merged commit 6e91c6b into hupkit:1.x Apr 14, 2023
@sstok sstok deleted the feature/advanced-config branch April 14, 2023 14:36
@sstok sstok mentioned this pull request May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant