Support .fdroid.yml.
This commit is contained in:
parent
5d20e0585b
commit
0a157d1c01
@ -17,7 +17,9 @@ The `fdroiddata` is placed into `/fdroiddata`.
|
||||
Should produce the `org.fdroid.fdroid` apk in `build`.
|
||||
|
||||
### Building in Repo
|
||||
If you have a directory named `fdroid` at the root of your repository, its contents will be copied over into the `/fdroiddata/metadata` directory. Additionally, the token `%REPO` in all metadata files will be replaced with the path to the repo in the container. This is so the metadata file does not need to know the exact path the repo will live at during the build.
|
||||
If you have a file named `.fdroid.yml` or `.fdroid.json` at the root of your repository, the build will be run right out of the repo using that metadata file; see [Running `fdroid build` in your app's source](https://f-droid.org/docs/Building_Applications/#running-fdroid-build-in-your-apps-source) (note that contrary to the doc, neither `.fdroid.txt` nor `.fdroid.xml` are supported anymore; thus, this image does not look for them).
|
||||
|
||||
Else, if you have a directory named `fdroid` at the root of your repository, its contents will be copied over into the `/fdroiddata/metadata` directory. Additionally, the token `%REPO` in all metadata files will be replaced with the path to the repo in the container. This is so the metadata file does not need to know the exact path the repo will live at during the build.
|
||||
|
||||
A F-Droid metadata file is named `<appId>.txt` and [looks like this](https://gitlab.com/fdroid/fdroiddata/blob/master/templates/app-full). So, if you have such a file located at `fdroid/net.monarchpass.app.txt`, you should be able to run this:
|
||||
|
||||
|
13
entrypoint
13
entrypoint
@ -3,10 +3,13 @@
|
||||
REPO="$(pwd)"
|
||||
export PATH="/opt/gradle/bin:$PATH"
|
||||
|
||||
if [ -d "fdroid" ]; then
|
||||
cp -Rv fdroid/* /fdroiddata/metadata;
|
||||
if [ ! -f ".fdroid.yml" ] && [ ! -f ".fdroid.json" ]; then
|
||||
if [ -d "fdroid" ]; then
|
||||
cp -Rv fdroid/* /fdroiddata/metadata;
|
||||
fi
|
||||
|
||||
cd /fdroiddata
|
||||
find ./metadata -type f -name "*.txt" -exec sed -i "s:%REPO:$REPO:g" {} +
|
||||
fi
|
||||
|
||||
cd /fdroiddata
|
||||
find ./metadata -type f -name "*.txt" -exec sed -i "s:%REPO:$REPO:g" {} +
|
||||
fdroid $@
|
||||
fdroid "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user