Coder Social home page Coder Social logo

pronamic / wp-deployer Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 227 KB

✗ [DEPRECATED] Console application to build and deploy WordPress solutions to the WordPress.org repository and AWS S3. Pronamic CLI is the successor of this project: https://github.com/pronamic/pronamic-cli.

PHP 98.22% CSS 1.78%
aws-s3 build deploy deployment deprecated wordpress

wp-deployer's People

Contributors

remcotolsma avatar rvdsteege avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wp-deployer's Issues

GitHub release assets added from `build/*.zip` inconvenient

/**
* GitHub release.
*
* @link https://cli.github.com/manual/gh_release_create
*/
$io->title( 'GitHub release' );
$assets = \array_map(
'\escapeshellarg',
\glob( $cwd . '/build/*.zip' )
);
$command = \sprintf(
'gh release create %s --title %s --notes-file - %s',
$tagname,
\escapeshellarg( $new_version ),
\implode( ' ', $assets )
);

Added in 177c421 by @rvdsteege. We don't know if users have a build folder and the *.zip are up to date. In the release of a plugin an old ZIP file was attached to the release since i didn't have a build script in place.

https://github.com/pronamic/wp-pronamic-pay/blob/ddb3cc968144f9619d5d6121e4c90b821967f8d2/composer.json#L121-L123

Bulk prefix version tags with `v`, for example: `1.0.0` → `v1.0.0`

GitHub advices to use the v prefix on the new release page: https://github.com/pronamic/wp-deployer/releases/new.

Scherm­afbeelding 2022-12-20 om 15 42 48

Tagging suggestions

It’s common practice to prefix your version names with the letter v. Some good tag names might be v1.0.0 or v2.3.4.

The wp-deployer version command will do this by default, but @pronamic we didn't do this by default. This results in a mix of 1.0.0 and v.1.0.1 tagnames, which is inconvenient when executing certain commands:

$tagname = 'v' . $version;
$object = 'tags/' . $tagname . ':composer.lock';

Should or can we prefix all tags with a v?
https://gist.github.com/knu/111055

Display bump version result

/**
* New version.
*
* @link https://docs.npmjs.com/cli/v8/commands/npm-version#description
* @link https://github.com/npm/node-semver#functions
*/
$bump_method = $io->choice(
'Select bump method',
[
'major',
'minor',
'patch',
],
'patch'
);

The choice function does not allow for labels as far as i know:
https://symfony.com/doc/current/console/style.html#user-input-methods

It would be great if we can display what version the patch, minor and major options will result in.

Run `composer run-script version` if available

Check composer.json scripts property for version script and run if defined.

  • preversion
  • version
  • postversion
  1. Run the preversion script. These scripts have access to the old version in package.json. A typical use would be running your full test suite before deploying. Any files you want added to the commit should be explicitly added using git add.
  1. Run the version script. These scripts have access to the new version in package.json (so they can incorporate it into file headers in generated files for example). Again, scripts should explicitly add generated files to the commit using git add.
  1. Run the postversion script. Use it to clean up the file system or automatically push the commit and/or tag.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.