Skip to content

Added support for a ExtraConfigFiles setting#7

Open
pynej wants to merge 1 commit into
leekelleher:masterfrom
pynej:master
Open

Added support for a ExtraConfigFiles setting#7
pynej wants to merge 1 commit into
leekelleher:masterfrom
pynej:master

Conversation

@pynej

@pynej pynej commented Jan 27, 2016

Copy link
Copy Markdown

Added support for a ExtraConfigFiles setting so users can manually include more files in the list.

Updated version accordingly.

Custom items can be added with a key like this added to appSettings in web.config.

<add key="ExtraConfigFiles" value=".HTACCESS=../.htaccess,Robots.txt=../robots.txt" />

…clude more files in the list.

Updated version accordingly.

Custom items can be added with a key like this added to appSettings in web.config.
<add key="ExtraConfigFiles" value=".HTACCESS=../.htaccess,Robots.txt=../robots.txt" />
@leekelleher

Copy link
Copy Markdown
Owner

Thanks @pynej, it's very much appreciated!

There's a couple of things that I want to comment on before merging in. I'll do those on the code changes.

@leekelleher leekelleher self-assigned this Jan 28, 2016
@leekelleher leekelleher added this to the 3.2.0 milestone Jan 28, 2016
Comment thread package/package.proj

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why bump the version number up to v3.5.0?

We'd like to go with v3.2.0.

@pynej

pynej commented Jan 28, 2016

Copy link
Copy Markdown
Author

Lol, apparently I can't count.
Yah it could probably use the file name but I'm thinking it would need the fill path, not jus the filename part so that its not confusing it one adds ../views/web.config for example.
I suppose if it worked like that and didn't take titles in then it could also support asking items via wildcard matches.

@TimGeyssens

Copy link
Copy Markdown
Collaborator

@pynej ow wildcard matches is a great idea, that way you could add one that looks for all config files on the app_plugins dir

@leekelleher

Copy link
Copy Markdown
Owner

+1 If we could find a way to have a wildcard matches across all sub-folders that would be great. 😎

Then the "ExtraConfigFiles" config value could be a comma-separated list of file-extensions; e.g. ".config,.htaccess,robots.txt" (Although "ExtraConfigFiles" might not be the best name for this).

@leekelleher leekelleher changed the title Added support for a ExtraConfigFiles setting so users can manually in… Added support for a ExtraConfigFiles setting Feb 9, 2016
@pynej

pynej commented Feb 11, 2016

Copy link
Copy Markdown
Author

Should be able to set up the code to handle items like this. (relative to /config for as thats where the main package tree list listing items from.)

key="ExtraConfigFiles" value="../.htaccess,../Views/.config,../App_Plugins//package.manifest,../App_Data/*/.xml"

Witch supports the following as illustrated in order listed above:

  • Individual files
  • Files in a folder with wildcard pattern matching (All config files in a directory for example.)
  • Above but from unnamed child folders. (All manifest files in App_Plugins for example regardless of how many there are.)
  • Fully Recursive search for all files in a folder or any of its children matching the pattern.

The code would look something like:

split on last /, search path - search name
if search path contains **
  get base folder
  get all files recursively
  filter for pattern matches
if search path contains *
  get parent folder before *
  get all children folders
  get all files
  filter for pattern matches
if search name contains *
  get search path bolder
  get all files
  filter for pattern matches
else
  get file 

@leekelleher leekelleher removed their assignment Feb 4, 2017
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.

3 participants