pento / testpress

Tool for helping you get a WordPress Core test environment up and running.
GNU General Public License v2.0
68 stars 2 forks source link

Building and Releasing #24

Closed pento closed 5 years ago

pento commented 6 years ago

We need to build releases for people to download, so that it's usable for everyone.

Ideally, there should be stable/testing/nightly channels for folks to opt into.

pento commented 6 years ago

To get building working on MacOS:

Add hazardous as a dependency. Add electron-builder as a devdep.

Add new scripts to package.json: "pack": "electron-builder --dir" and "postinstall": "electron-builder install-app-deps".

Add build config to package.json:

    "build": {
        "appId": "org.wordpress.wpde",
        "asarUnpack": [
            "src/services/docker/Docker*"
        ],
        "extends": null,
        "files": [
            "assets/**/*",
            "build/**/*",
            "node_modules/**/*",
            "src/**/*"
        ],
        "mac": {
            "category": "public.app-category.developer-tools",
            "icon": "assets/icon.png"
        }
    }

Save a large WordPress logo as assets/icon.png.

Add /dist to .gitignore.

Add to the top of docker/index.js:

// Hazardous overrides some of the functions from "path" to make them work correctly when WPDE is packaged.
require( 'hazardous' );