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

-lite target should exclude Pro-only files #73

Closed
raamdev opened this issue Apr 10, 2016 · 8 comments
Closed

-lite target should exclude Pro-only files #73

raamdev opened this issue Apr 10, 2016 · 8 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Apr 10, 2016

The idea is to be able to add a new flag, /*[pro strip-file-from="lite"]*/, to the top of any files that are Pro-only files that should not be included in the generated Lite version.

Then, we can update the lite.xml target to include the following right after copying the Pro files to the Lite staging area:

<delete>
  <fileset dir="${project.basedir}/.~build/${project_lite_slug}">
    <contains text="/*[pro strip-file-from="lite"]*/" />
  </fileset>
</delete>

Jason and I have been discussing this issue a lot on Slack; see https://websharks.slack.com/archives/phings/p1460243931000102 for more details.


Also noting that this Comet Cache issue depends on Phings being updated to exclude Pro-only files: wpsharks/comet-cache#709

@raamdev
Copy link
Contributor Author

raamdev commented Apr 10, 2016

Also noting here that once this work has been completed, we can update the projects that are using the Lite target (e.g., Comet Cache and Comment Mail) and simplify their .build.props file.

Right now we're using project_lite_other_phar_fileset_exclusions and project_lite_other_zip_tgz_fileset_exclusions to exclude the Pro-only files from the distributions, but once we exclude the Pro-only files earlier in the Lite build process by adding a /*[pro strip-file-from="lite"]*/ flag to the tops of the relevant files, many of those additional exclusions in .build.php won't be necessary.

@jaswrks
Copy link
Contributor

jaswrks commented Apr 10, 2016

Next Release Changelog:

@raamdev
Copy link
Contributor Author

raamdev commented Apr 10, 2016

@jaswsinc I'm wondering if we should change strip-file-from to exclude-file-from. That seems more appropriate and less easy to confuse with strip-from, which I've already done at least once. That would give us the following:

/*[pro exclude-file-from="lite"]*/

and

/*[pro strip-from="lite"]*/
/*[/pro]*/

I can make these changes and submit another PR if you agree.

@raamdev raamdev reopened this Apr 10, 2016
@raamdev
Copy link
Contributor Author

raamdev commented Apr 11, 2016

@jaswsinc I'm about to update the Comet Cache Pro-only files with this marker in preparation for publishing an RC—I just wanted to see if you agreed with changing the name or if you'd rather stick with strip-file-from.

@jaswrks
Copy link
Contributor

jaswrks commented Apr 11, 2016

Agree. I like exclude better also, but if we can support either/or that'd be great.

@raamdev
Copy link
Contributor Author

raamdev commented Apr 11, 2016

support either/or

Hmm, how would that work? Apply two regexes to the file in succession, one for each?

@jaswrks
Copy link
Contributor

jaswrks commented Apr 11, 2016

Something like this maybe.

<containsregexp expression="\/\*\!?\[pro (?:exclude|strip)\-file\-from\=['&quot;]lite['&quot;]\]\*\/" />

@raamdev
Copy link
Contributor Author

raamdev commented Apr 11, 2016

🤦 Right, of course.

raamdev added a commit that referenced this issue Apr 11, 2016
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Apr 11, 2016
@jaswrks jaswrks closed this as completed Apr 11, 2016
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Apr 12, 2016
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Apr 12, 2016
These are now excluded via the /*[pro exclude-file-from="lite"]*/
marker that Phing looks for while building the Lite version.

See wpsharks/phings#73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants