{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif4c2almixoitvukm2lr3sbip2siawfvvjtxgrjwzij7oovryezxi",
"uri": "at://did:plc:34cg4tn4iwemk3v5k3n3adwf/app.bsky.feed.post/3mfn6l7bot442"
},
"path": "/t/looking-for-assistance-with-fixing-an-apps-metadata/34134#post_1",
"publishedAt": "2026-02-24T21:40:32.000Z",
"site": "https://forum.f-droid.org",
"tags": [
"test run",
"if I try to use"
],
"textContent": "First time I’ve ever contributed to F-Droid, written metadata, or worked with linux utilities like sed so I’m a little out of my comfort zone here. I’ve opened an issue at this point, and have dove in to see if I can learn anything. As you can probably tell from the history, I’m struggling a little to come up with a solution.\n\nFrom discussions in the F-Droid Matrix server, my understanding is that I need to somehow get the versionName and Code information into the Gradle build. The suggested method for this was using `sed` to edit the build file and put in the static information prior to build. Using sed beyond a quick and basic string manipulation was beyond me, so I’ve been going down a path of providing a patch file that patches out the multiline code the upstream author created, replaces it with simple tokens which I then use sed to replace with the static version info. This is turning out to be problematic, because as I’ve discovered, the `patch` command may fail or succeed depending on the current working directory of its command. In a test run, I’m able to confirm that the patch succeeds so long as the working directory is within the `app` subfolder of the upstream’s code (which is also specified in the build metadata.) However, if I try to use the `patch:` key in build metadata, this fails, I can only assume because the patch command is running from a different working directory, and I’m not sure how to manipulate the diff/patch file to make it succeed here.\n\nAny suggestions to make this succeed would be greatly appreciated!",
"title": "Looking for assistance with fixing an app's metadata"
}