Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5859

Add an update command to help nro devs stay up to date

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Could have Could have
    • None
    • None
    • Dev Tools

      NRO devs don't have a straightforward way to stay up to date with latest development of some repositories like master-theme or gutenberg-blocks. It requires to go in each folder, pull, update submodule, recompile, etc.

      We can add a command to our docker-compose Makefile, that would run one or multiple new scripts `update.sh` (update-source, update-deps) included in base-fork (see `install-deps.sh` for inspiration)

      This process should:

      • run composer and npm updates through docker, so that it uses the tools in it
      • update base-fork if possible
      • update master-theme and gutenberg-blocks source, and for each:
        • update submodules
        • rebuild composer dependencies if needed (change in composer.lock)
        • rebuild npm dependencies if needed (change in packages.lock)

      We already have a command to rebuild assets (make assets), so make update could call it in the end.

      An early version living in my Makefile (no dependencies handling):

      ## Update master-theme and gutenberg-blocks, rebuild assets
      .PHONY: update
      .ONESHELL:
      update:
      	@echo "Updating master theme..."
      	pushd persistence/app/public/wp-content/themes/planet4-master-theme
      	git checkout master
      	git pull
      	git submodule update
      	popd
      	@echo "Updating gutenberg blocks..."
      	pushd persistence/app/public/wp-content/plugins/planet4-plugin-gutenberg-blocks
      	git checkout master
      	git pull
      	git submodule update
      	popd
      	@echo "Rebuilding assets..."
      	$(MAKE) assets
      	echo "Done."
      

       

            Unassigned Unassigned
            fhernand Florent Hernandez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: