-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/theme management #46
Conversation
c60fda6
to
36ebaeb
Compare
757302c
to
1d49987
Compare
@harry-m Would you like to make sure it works? Should be pretty self-explanatory, if you run (Oh yes... I just remembered I need to update the README. I'll add that to the list.) |
d7f40d0
to
d1282c1
Compare
The new README: https://github.com/dxw/whippet/tree/feature/theme-management |
@Stretch96 Please can you review/test this? |
NB see Tom's list of post-merge tasks in his main update above. |
I've gone through the
Adding
Changing the check in Base.php to:
Catches this error (I think it's because
changing line 18 in WhippetLock.php to:
catches this |
Did you run (It's also useful for the Travis tests because we need to test 5.5 but the latest version of PHPUnit only supports 5.6 and 7.0).
That's PHP 7 syntax. We can't use that quite yet. Things to fix:
|
50bcbe0
to
ca19382
Compare
- Add Modules/Helpers/FileLocator - Look for plugins or whippet.json files - Add Modules/Helpers/Dependencies - Add Modules/Helpers/WhippetLock - Add Modules/Dependencies - Pre-DRY tests - Handle already-cloned repos - Add fromString/fromFile static methods to WhippetLock - Show useful output - s/Dependencies/DependenciesInstaller/ - Move new classes out of Modules\Helpers - Check the hash before installing - Move some test helpers into a separate trait - Output errors - Add DependenciesUpdater - Add update command - Add paths to gitignore - Add plugins to DependenciesInstall - Add plugins to DependenciesUpdater - Add dependencies migrate command - mv WhippetLock Files/WhippetLock - Move some functionality from DependenciesUpdate into WhippetLock - Rename dependencies, and update FileLocator usage - Rename Dependencies* classes - Pass directory instead of FileLocator - Add isErr check to Migration - Update: test for failed git command - FileLocator: update message - s/FileLocator/DirectoryLocator/ - DirectoryLocator: Prevent bug with plugins directory - migrate: Pretty-print whippet.json - Pretty-print whippet.lock - Do not bork on missing whippet.lock - Dependencies: Ignore plugins file entirely - Print sensible error if plugins file not found - Add getNullFactory() to tests - Move JSON parsing/file writing out of WhippetLock into abstract class - Support explicit src - Allow themes/plugins without refs - Catch failing clones - Catch failing checkouts - fromString and fromFile return result objects - Blank lockfile: show a message - Blank json file: show message - Tests: don't override that method - Don't output warning on missing .gitignore - Add Files/WhippetJson - Handle removing previously-installed dependencies from gitignore - Migration: do not overwrite existing whippet.json - Fix a couple of bugs in Updater - Bubble errors properly - Don't bork if whippet.lock is missing - Dependencies/Updater: refactor for readability - Dependencies/Installer: refactor for readability - Dependencies/Migration: refactor for readability - Make deps an alias for dependencies - Catch a broken JSON issue - Add deprecation notice to plugins install/upgrade - Update whippet_init to find whippet.json - deploy: use Dependencies/Installer if possible - Modify the deprecation notice for internal use of Module/Plugin - Replace DirectoryLocator with ProjectDirectory - Improve getFactory() test helper - Do not directly instantiate other classes in tests - Instantiate Installer correctly - DRY - Update README - Lock sebastian/environment at a version that supports PHP 5.5 Fixes: #41
31d42bd
to
1059e5c
Compare
This will fix #41. In progress.
Install:
dependencies
ordeps
whippet deps install
reads fromwhippet.lock
and installs the themes in the appropriate placeswhippet plugins install
doesUpdate:
whippet deps update
reads fromwhippet.json
, updateswhippet.lock
appropriately, and installs the themeswhippet deps update
should modify the gitignore file tooPlugins:
whippet.lock
whippet.json
whippet deps migrate
commandLoose ends:
->unwrap()
call has a->isErr()
checkwhippet.lock
(seeJSON_PRETTY_PRINT
)whippet.json
when migratingdependencies install/update
should ignoreplugins
file entirelydependencies update
prints errordependencies install
doesn't produce any output, mysteriously$git->clone_repo()
fails$git->checkout()
failswhippet dependencies migrate/update
in all the projects, and see if anything breaksPHP Warning: file(/workbench/src/github.com/dxw/.gitignore): failed to open stream: No such file or directory in /workbench/src/github.com/dxw/whippet/src/Git/Gitignore.php on line 27
migrate
should refuse to overwrite an existingwhippet.json
filedeps
an alias fordependencies
update
on{"plugins":[{"name":"foo"}]}
- it'll produce a warningwhippet plugins
commandsWhippetHelpers->whippet_init
to find the whippet directory when there's noplugins
filedeploy
(Modules\Release
): ifwhippet.json
exists then useDependencies\Install
, otherwise fallback to usingModules\Plugin
plugins
andplugins.lock
files->__toString()
Make tickets (after this has been merged, or shortly before):
whippet deps update themes/twentysixteen
. See Allow updating individual dependencies #64whippet dependencies update
?". See Add some more user-friendly error messages #65Notice: Undefined index: hash in /Users/chris/github-repos/whippet/src/Files/WhippetLock.php on line 18
. See whippet dependencies causes errors in some weird circumstances #63--no-install
towhippet dependencies update
(if there's a need - there may not be). Not made into separate issueModule/Plugins
. See Future: Remove whippet plugins command #66whippet plugins install
=>whippet dependencies install
whippet plugins upgrade
=>whippet dependencies update
whippet migrate
(generator) needs to be updated to generate awhippet.json
file instead of aplugins
file. See Update whippet migrate to generate a whippet.json file #67['themes', 'plugins']
everywhere is not DRY. See Repeating['themes', 'plugins']
everywhere is not DRY #70