2017 © Pedro Peláez
 

silverstripe-module build

Phing build helpers for projects making use of the silverstripe-base installation process.

image

silverstripe-australia/build

Phing build helpers for projects making use of the silverstripe-base installation process.

  • Friday, June 30, 2017
  • by nyeholt
  • Repository
  • 3 Watchers
  • 1 Stars
  • 17,105 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 6 Forks
  • 6 Open issues
  • 38 Versions
  • 3 % Grown

The README.md

Requirments

  • Phing
  • php cli
  • PEAR (with a version of phpunit supported by silverstripe)

Installation

  • Edit scripts/build.xml and change the name attribute to
  • Copy scripts/build.properties.sample to scripts/build.properties
  • Edit build.properties and change the DB configuration and rewrite.base settings.
  • Run phing -f scripts/build.xml to make sure everything installs
  • If you require additional modules, add them into the scripts/dependent-modules file, then run phing -f scripts/build.xml update_modules
  • Run phing -f scripts/build.xml test to make sure everything's working as expected

Phing targets

Commonly used targets, (*1)

  • build
  • test
  • package

Helpful for development:, (*2)

  • pak - builds a .sspak file at mysite/build/site.sspak . Useful for CI
  • phpstan - Runs PHPStan + PHPStan for SilverStripe if it's installed via Composer. Useful for static analysis of PHP code.
    • Define folders to scan by placing following in your build.xml file, underneath the <project> tag.
      • <property name="phpstan.dir" value="mysite/src mysite/tests" />

Composer scripts

If your themes use yarn based dependencies, you can add the following post-install scripts to be triggered by a composer call, which will ensure the node_modules are installed correctly, (*3)

    "scripts": {
        "post-update-cmd": [        
                "Symbiote\\Build\\ThemeBuilder::run"
        ],
        "post-install-cmd": [
                "Symbiote\\Build\\ThemeBuilder::run"
        ]
    },

Optional Scripts

There are three scripts that may optionally be used for your projects, and can be done using the following commands., (*4)

sh build/scripts/cache

This will clear out any project cache files (for all projects), and is basically the forced equivalent of doing a ?flush for everything in your site., (*5)

sh ~/path/to/permissions

This requires you to update the "{user}" and as such will need to be copied out to a location of your choice, and will apply the appropriate owner and permissions to both the cache and repository., (*6)

sh build/scripts/recursive-status

This will recursively trigger a "git status" on each module directory found within your repository, primarily so you check for changes that may have been made in a module that hasn't been included in the repository code base., (*7)

sh build/scripts/recursive-status assume-unchanged-listing

When you have patched files (resulting in them coming up as being modified during a recursive-status), you can git update-index --assume-unchanged {file_name}, and use this script with a parameter. This will not only list out the files that have been assumed unchanged, but it will also force the files to reflect the upstream. This makes sure you don't have local changes that have been accidentally made, however it will also remove any patches that were put in place. Therefore, you can run this and then phing to ensure the patches remain in place., (*8)

Excluding files from packages

Create a {root}/.pkgignore file with a set of paths to be excluded from built up package files, (*9)

vendor/un-used/module/
themes/mytheme/node_modules/
mysite/cypress/

The Versions

30/06 2017

2.1.x-dev

2.1.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

30/06 2017

2.1.1

2.1.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

30/06 2017

dev-master

9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

30/06 2017

3.0.2

3.0.2.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

29/06 2017

3.0.1

3.0.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

23/06 2017

3.0.0

3.0.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

22/05 2017

2.1.0

2.1.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

08/04 2017

2.0.1

2.0.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

30/01 2017

2.0.0

2.0.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

21/12 2015

1.5.x-dev

1.5.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

21/12 2015

1.5.3

1.5.3.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

27/10 2015

1.5.2

1.5.2.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

02/10 2015

1.5.1

1.5.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

25/09 2015

1.5.0

1.5.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

01/09 2015

1.4.x-dev

1.4.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

01/09 2015

1.4.2

1.4.2.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

29/07 2015

1.4.1

1.4.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

07/07 2015

1.4.0

1.4.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

07/07 2015

1.3.x-dev

1.3.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

07/07 2015

1.3.5

1.3.5.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

01/07 2015

1.3.4

1.3.4.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

01/07 2015

1.3.3

1.3.3.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

29/06 2015

1.3.2

1.3.2.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

19/06 2015

1.3.1

1.3.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

26/05 2015

1.3.0

1.3.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

26/05 2015

1.2.x-dev

1.2.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

26/05 2015

1.2.5

1.2.5.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

12/05 2015

1.2.4

1.2.4.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

24/04 2015

1.2.3

1.2.3.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

24/04 2015

1.2.2

1.2.2.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

24/04 2015

1.2.1

1.2.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

16/04 2015

1.2.0

1.2.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

16/04 2015

1.1.x-dev

1.1.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

16/04 2015

1.1.1

1.1.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

15/04 2015

1.1.0

1.1.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

17/03 2015

1.0.x-dev

1.0.9999999.9999999-dev

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

17/03 2015

1.0.1

1.0.1.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build

17/03 2015

1.0.0

1.0.0.0

Phing build helpers for projects making use of the silverstripe-base installation process.

  Sources   Download

BSD-3-Clause

silverstripe build