pronamic/wp-deployer

该软件包已被废弃且不再维护。作者建议使用pronamic/pronamic-cli软件包。
关于该软件包最新版本(v1.3.0)没有可用的许可证信息。

WordPress部署器。

v1.3.0 2023-03-03 14:25 UTC

This package is auto-updated.

Last update: 2023-04-12 18:02:00 UTC


README

控制台应用程序,用于构建和部署WordPress解决方案到WordPress.org仓库和AWS S3。

警告 已废弃,因为Pronamic CLI是后续版本。

目录

命令

changelog

显示从CHANGELOG.md中特定版本的变更日志条目。

bin/wp-deployer changelog 1.0.0

svn-release

将目录发布到Subversion仓库。

bin/wp-deployer svn-release build/plugin build/svn https://plugins.svn.wordpress.org/pronamic-pay-with-mollie-for-gravity-forms 1.0.0

wp-org-release

将目录发布到WordPress插件目录。

bin/wp-deployer wp-org-release build/plugin build/svn pronamic-pay-with-mollie-for-gravity-forms

示例

bin/wp-deployer deploy easycruit https://gitlab.com/pronamic-plugins/easycruit.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-client https://github.com/pronamic/wp-pronamic-client.git --to-s3 --to-wp-org -vvv
bin/wp-deployer deploy pronamic-events https://github.com/pronamic/wp-pronamic-events.git --to-s3 --to-wp-org -vvv
bin/wp-deployer deploy pronamic-ideal https://github.com/pronamic/wp-pronamic-ideal.git --to-s3 --to-wp-org -vvv
bin/wp-deployer deploy pronamic-ideal https://github.com/pronamic/wp-pronamic-ideal.git --branch=develop --to-s3 -vvv
bin/wp-deployer deploy woocommerce-bulk-product-variations https://gitlab.com/pronamic-plugins/woocommerce-bulk-product-variations.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-adyen https://github.com/wp-pay-gateways/adyen.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-adyen https://github.com/wp-pay-gateways/adyen.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-contact-form-7 https://github.com/pronamic/wp-pronamic-pay-contact-form-7.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-contact-form-7 https://github.com/pronamic/wp-pronamic-pay-contact-form-7.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-digiwallet https://github.com/pronamic/wp-pronamic-pay-digiwallet.git --branch=main --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-fundraising https://github.com/pronamic/wp-pronamic-pay-fundraising.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-paypal https://github.com/pronamic/wp-pronamic-pay-paypal.git --to-s3 -vvv
bin/wp-deployer deploy pronamic-pay-payvision https://github.com/pronamic/wp-pronamic-pay-payvision.git --branch=main --to-s3 -vvv

替代方案

以下是我们发现的一些替代方案。然而,这些方案都无法满足我们的要求。

如果您知道其他类似的项目,请随时编辑本节!

Subversion检出

https://svnbook.subversion.org.cn/en/1.7/svn.ref.svn.c.checkout.html

svn co https://plugins.svn.wordpress.org/pronamic-ideal svn/pronamic-ideal --depth immediates

svn update --quiet svn/pronamic-ideal/trunk --set-depth infinity

svn update --quiet svn/pronamic-ideal/assets --set-depth infinity

Git检出

https://www.git-scm.com/docs/git-clone

git clone https://github.com/pronamic/wp-pronamic-ideal.git git/pronamic-ideal

更新

cd svn/pronamic-ideal

svn update

cd ../../
cd git/pronamic-ideal

git pull

cd ../../

检出

cd git/pronamic-ideal

git checkout tags/5.4.1

composer install --no-dev --prefer-dist

cd ../../

构建

rm -r build/pronamic-ideal

mkdir build/pronamic-ideal

rsync --recursive --delete --exclude-from=exclude.txt ./git/pronamic-ideal/ ./build/pronamic-ideal/

创建ZIP

mkdir zip/pronamic-ideal

zip -r ./zip/pronamic-ideal/pronamic-ideal.5.4.1.zip ./build/pronamic-ideal/*

创建tar.gz

mkdir tar/pronamic-ideal

tar -zcvf ./tar/pronamic-ideal/pronamic-ideal.5.4.1.tar.gz ./build/pronamic-ideal/*

转到Subversion

rsync --recursive --delete ./build/pronamic-ideal/ ./svn/pronamic-ideal/trunk/

svn status ./svn/pronamic-ideal/trunk/ | grep '^!' | cut -c 9- | xargs -d '\n' -i svn delete {}@

svn status ./svn/pronamic-ideal/trunk/ | grep '^?' | cut -c 9- | xargs -d '\n' -i svn add {}@

svn commit ./svn/pronamic-ideal/trunk/ -m 'Update'

标记Subversion

svn copy ./svn/pronamic-ideal/trunk/ ./svn/pronamic-ideal/tags/4.5.1/

svn commit ./svn/pronamic-ideal/tags/4.5.1/ -m 'Tagging version 4.5.1'

需求

# GNU tools on Mac.
# https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

# GNU `cat`
brew install coreutils

# GNU `xargs`:
# https://superuser.com/questions/467176/replacement-for-xargs-d-in-osx
brew install findutils --with-default-names

# GNU `grep`:
# https://apple.stackexchange.com/questions/193288/how-to-install-and-use-gnu-grep-in-osx
brew install grep --with-default-names

# AWS Command Line Interface
# https://aws.amazon.com/cli/
brew install awscli

svn statusxargs

svn statusxargssvn delete

svn status | grep '^!' | cut -c 9- | xargs -d '\n' -i svn delete {}@
# ^^^^^^^^   ^^^^^^^^^   ^^^^^^^^^   ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
#   |            |           |             |               |       |
#   |            |           |             |               |       \\ https://stackoverflow.com/questions/757435/how-to-escape-characters-in-subversion-managed-file-names
#   |            |           |             |               |       \\ https://svnbook.subversion.org.cn/en/1.7/svn.advanced.pegrevs.html
#   |            |           |             |               |
#   |            |           |             |               \\ Subversion delete.
#   |            |           |             |
#   |            |           |             \\ Xargs.
#   |            |           |
#   |            |           \\ Cut.
#   |            |           \\ https://github.com/apache/subversion/blob/1.10.2/subversion/svn/status.c#L447-L460
#   |            |
#   |            \\ Grep.
#   |
#   \\ Subversion status.

svn statusxargssvn add

svn status | grep '^?' | cut -c 9- | xargs -d '\n' -i svn add {}@
# ^^^^^^^^   ^^^^^^^^^   ^^^^^^^^^   ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
#   |            |           |             |               |    |
#   |            |           |             |               |    \\ https://stackoverflow.com/questions/757435/how-to-escape-characters-in-subversion-managed-file-names
#   |            |           |             |               |    \\ https://svnbook.subversion.org.cn/en/1.7/svn.advanced.pegrevs.html
#   |            |           |             |               |
#   |            |           |             |               \\ Subversion add.
#   |            |           |             |
#   |            |           |             \\ Xargs.
#   |            |           |
#   |            |           \\ Cut.
#   |            |           \\ https://github.com/apache/subversion/blob/1.10.2/subversion/svn/status.c#L447-L460
#   |            |
#   |            \\ Grep.
#   |
#   \\ Subversion status.

WordPress.org 资产

链接