Skip to content

Commit 0a5e719

Browse files
committed
Add just svn-release
1 parent 2b4d698 commit 0a5e719

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

justfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
repo_root := `pwd`
22
svn_dir := "./wp-org-svn"
3+
svn_user := "staticwebio"
34
wordpress_dir := "./dev/data/wordpress1"
45

56
alias b := build
@@ -59,6 +60,19 @@ rector: && _phpcbf
5960
svn-checkout:
6061
svn co https://plugins.svn.wordpress.org/staticweb-deploy "{{ svn_dir }}"
6162

63+
# Release latest source build using version in update.json
64+
svn-release:
65+
just _svn-sync-trunk "$(nix build .#pluginWpOrgSrc --print-out-paths)"
66+
just _svn-release-version "$(jq -r .version update.json)"
67+
68+
_svn-release-version VERSION:
69+
svn cp "{{ svn_dir }}"/trunk "{{ svn_dir }}"/tags/"{{ VERSION }}"
70+
svn ci "{{ svn_dir }}" --username "{{ svn_user }}" -m "tagging version {{ VERSION }}"
71+
72+
_svn-sync-trunk SRC:
73+
rsync -av --delete --chmod=F664,D775 --owner "{{ SRC }}"/* "{{ svn_dir }}"/trunk/
74+
svn add --force "{{ svn_dir }}"/trunk/*
75+
6276
# Update subversion repo from WordPress.org
6377
svn-update:
6478
svn up "{{ svn_dir }}"

0 commit comments

Comments
 (0)