2023-09-06 10:34:36 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
MANIFEST_SCHEMA_LINE='#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json'
|
|
|
|
TESTS_SCHEMA_LINE='#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json'
|
2024-06-21 12:11:40 +02:00
|
|
|
CONFIGPANEL_SCHEMA_LINE='#:schema https://github.com/YunoHost/apps/raw/master/schemas/config_panel.v1.schema.json'
|
2023-09-06 10:34:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
if [ -f "manifest.toml" ]; then
|
|
|
|
if ! grep "#:schema" "manifest.toml" >/dev/null; then
|
|
|
|
sed -i "1 s|^|$MANIFEST_SCHEMA_LINE\n|" manifest.toml
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "tests.toml" ]; then
|
|
|
|
if ! grep "#:schema" "tests.toml" >/dev/null; then
|
|
|
|
sed -i "1 s|^|$TESTS_SCHEMA_LINE\n|" tests.toml
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2024-06-21 12:11:40 +02:00
|
|
|
if [ -f "config_panel.toml" ]; then
|
|
|
|
if ! grep "#:schema" "config_panel.toml" >/dev/null; then
|
|
|
|
sed -i "1 s|^|$CONFIGPANEL_SCHEMA_LINE\n|" tests.toml
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-09-06 10:34:36 +02:00
|
|
|
git add manifest.toml tests.toml
|