Automattic / Automattic/pressship
SVN release from trunk fails on sibling directory assets and blocks retry
- Dominant language
- TypeScript
- Stars
- 51
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
On the first release of an approved WordPress.org plugin, publishing from an SVN checkout root fails while setting MIME types when directory assets already live in the standard sibling `assets/` directory.
Pressship discovers the plugin in `trunk/`, so `rootDir` is the trunk directory. `syncAssets()` consequently looks only for `trunk/.wordpress-org`. When that directory is absent, `assetFiles` is empty and the existing sibling `assets/*` files are never passed to `svn add`. `setAssetMimeTypes()` then finds those physical files and tries `svn propset`, which fails because they remain unversioned.
### Environment
- Pressship 0.2.2 via `npx pressship`
- macOS
- Fresh WordPress.org SVN repository with empty `trunk/`, `tags/`, and `assets/`
- Plugin runtime copied into `trunk/`
- WordPress.org listing images copied into sibling `assets/`
### Reproduction
1. Check out an approved, not-yet-released plugin SVN repository.
2. Put the validated plugin package in `trunk/`.
3. Put PNG/SVG listing assets directly in sibling `assets/`.
4. Run `npx pressship publish --release -y`.
The release reaches:
```text
Creating tag 0.5.9
A tags/0.5.9
...
assets/banner-1544x500.png is not under version control
svn: E155010: The node .../assets/banner-1544x500.png was not found.
svn propset svn:mime-type image/png assets/banner-1544x500.png failed.
```
`svn status` shows every sibling asset as `?`, while trunk and the tag are scheduled for addition.
### Expected
For an SVN-root release, Pressship should either:
- recognize and add files already present in the sibling `assets/` directory, or
- require/copy a declared asset source before attempting MIME properties.
It should not attempt `svn propset` on unversioned files.
### Retry problem
The failed attempt leaves `tags/` scheduled locally. A retry then stops at `assertReleaseVersionIsNew()` because it checks filesystem existence, reporting that the version already exists in WordPress.org SVN even though no commit occurred and the remote tag is absent. Checking the remote/versioned state, or cleaning the failed scheduled tag, would make recovery possible.
### Confirmed workaround
Creating `trunk/.wordpress-org` from the sibling assets and publishing with `--ignore ".wordpress-org/**"` causes Pressship to add the sibling assets before setting MIME types. This confirms the failure is asset-source discovery/order, not SVN permissions or the files themselves.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at syncAssets(), setAssetMimeTypes(), and assertReleaseVersionIsNew(); trace how rootDir and sibling assets are discovered and how local scheduled tags are checked. Reproduce the failed release with the described SVN layout, then verify asset MIME handling does not target unversioned files and a failed local tag can be retried without a remote tag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100