mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 18:50:11 +02:00
remove jq dependency in the tests, port to GNU sed
This avoids spreading the jq dependency to more places, like: https://gitlab.com/eighthave/ansible-role-install-fdroidserver-dependencies/-/jobs/5559798360 And is helpful when porting to non-Debian platforms.
This commit is contained in:
parent
4b5dd72674
commit
f13d9235ce
@ -19,7 +19,7 @@ buildserver run-tests:
|
|||||||
image: registry.gitlab.com/fdroid/fdroidserver:buildserver
|
image: registry.gitlab.com/fdroid/fdroidserver:buildserver
|
||||||
script:
|
script:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install gnupg-agent jq python3-babel python3-clint
|
- apt-get install gnupg-agent python3-babel python3-clint
|
||||||
- ./tests/run-tests
|
- ./tests/run-tests
|
||||||
# make sure that translations do not cause stacktraces
|
# make sure that translations do not cause stacktraces
|
||||||
- cd $CI_PROJECT_DIR/locale
|
- cd $CI_PROJECT_DIR/locale
|
||||||
@ -98,7 +98,6 @@ debian_testing:
|
|||||||
git
|
git
|
||||||
gnupg
|
gnupg
|
||||||
ipfs-cid
|
ipfs-cid
|
||||||
jq
|
|
||||||
python3-defusedxml
|
python3-defusedxml
|
||||||
python3-setuptools
|
python3-setuptools
|
||||||
sdkmanager
|
sdkmanager
|
||||||
@ -123,7 +122,7 @@ ubuntu_lts_ppa:
|
|||||||
- echo "deb http://ppa.launchpad.net/fdroid/fdroidserver/ubuntu $RELEASE main" >> /etc/apt/sources.list
|
- echo "deb http://ppa.launchpad.net/fdroid/fdroidserver/ubuntu $RELEASE main" >> /etc/apt/sources.list
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get dist-upgrade
|
- apt-get dist-upgrade
|
||||||
- apt-get install --install-recommends dexdump fdroidserver git jq python3-setuptools sdkmanager
|
- apt-get install --install-recommends dexdump fdroidserver git python3-setuptools sdkmanager
|
||||||
|
|
||||||
# Test things work with a default branch other than 'master'
|
# Test things work with a default branch other than 'master'
|
||||||
- git config --global init.defaultBranch thisisnotmasterormain
|
- git config --global init.defaultBranch thisisnotmasterormain
|
||||||
@ -139,7 +138,7 @@ ubuntu_jammy_pip:
|
|||||||
image: ubuntu:jammy
|
image: ubuntu:jammy
|
||||||
<<: *apt-template
|
<<: *apt-template
|
||||||
script:
|
script:
|
||||||
- apt-get install git default-jdk-headless jq python3-pip python3-venv rsync
|
- apt-get install git default-jdk-headless python3-pip python3-venv rsync
|
||||||
|
|
||||||
# setup venv to act as release build machine
|
# setup venv to act as release build machine
|
||||||
- python3 -m venv sdist-env
|
- python3 -m venv sdist-env
|
||||||
@ -279,7 +278,6 @@ fedora_latest:
|
|||||||
git
|
git
|
||||||
gnupg
|
gnupg
|
||||||
java-17-openjdk-devel
|
java-17-openjdk-devel
|
||||||
jq
|
|
||||||
openssl
|
openssl
|
||||||
python3
|
python3
|
||||||
python3-babel
|
python3-babel
|
||||||
|
@ -301,8 +301,8 @@ $sed -i.tmp -e 's,timestamp="[0-9]*",timestamp="1676634233",' repo/index.xml
|
|||||||
diff -uw $WORKSPACE/tests/repo/index.xml repo/index.xml
|
diff -uw $WORKSPACE/tests/repo/index.xml repo/index.xml
|
||||||
sed -i --expression='s,"timestamp": [0-9]*,"timestamp": 1676634233000,' repo/index-v1.json
|
sed -i --expression='s,"timestamp": [0-9]*,"timestamp": 1676634233000,' repo/index-v1.json
|
||||||
diff -uw $WORKSPACE/tests/repo/index-v1.json repo/index-v1.json
|
diff -uw $WORKSPACE/tests/repo/index-v1.json repo/index-v1.json
|
||||||
jq "del(.packages[]|.versions[]|.file.ipfsCIDv1)" $WORKSPACE/tests/repo/index-v2.json > repo/index-v2.org.json
|
sed -z 's/,\s*"ipfsCIDv1": *"[a-z0-9]*"//g' $WORKSPACE/tests/repo/index-v2.json > repo/index-v2.org.json
|
||||||
jq "del(.packages[]|.versions[]|.file.ipfsCIDv1)" repo/index-v2.json > repo/index-v2.mod.json
|
sed -z 's/,\s*"ipfsCIDv1": *"[a-z0-9]*"//g' repo/index-v2.json > repo/index-v2.mod.json
|
||||||
sed -i --expression='s,"timestamp": [0-9]*,"timestamp": 1676634233000,' repo/index-v2.mod.json
|
sed -i --expression='s,"timestamp": [0-9]*,"timestamp": 1676634233000,' repo/index-v2.mod.json
|
||||||
diff -uw repo/index-v2.org.json repo/index-v2.mod.json
|
diff -uw repo/index-v2.org.json repo/index-v2.mod.json
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user