Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4318b50f authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Download ruleset_converter from latest tag pipeline

parent 3bfb9a3c
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@ depot_tools/
.gcs_entries
*.txt
*.dat
ruleset_converter
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ update-filters:
  extends: .build-filters
  needs: []
  script: 
    - apt-get update && apt-get install -y curl
    - apt-get update && apt-get install -y curl jq
    - bash generate_filters.sh
  artifacts:
    paths:
+23 −0
Original line number Diff line number Diff line
#!/bin/bash

set -e

GITLAB_API="https://gitlab.e.foundation/api/v4"
PROJECT_PATH=$(echo -n "e/os/browser" | jq -sRr @uri)

latest_tag=$(curl -s "${GITLAB_API}/projects/${PROJECT_PATH}/repository/tags" \
    | jq -r '.[0].name')
echo "Fetching pipeline for tag $latest_tag..."

pipeline_id=$(curl -s "${GITLAB_API}/projects/${PROJECT_PATH}/pipelines?ref=${latest_tag}" \
    | jq -r '.[0].id')
echo "Downloading ruleset_converter from build-cromite-x64, Pipeline ID: $pipeline_id"

job_id=$(curl -s "${GITLAB_API}/projects/${PROJECT_PATH}/pipelines/${pipeline_id}/jobs" \
    | jq -r '.[] | select(.name=="build-cromite-x64") | .id')

curl -L \
    --output ruleset_converter \
    "${GITLAB_API}/projects/${PROJECT_PATH}/jobs/${job_id}/artifacts/bin/ruleset_converter"

chmod +x ruleset_converter

echo "Downloading filter lists..."
curl -o easylist.txt https://easylist.to/easylist/easylist.txt
curl -o easyprivacy.txt https://easylist.to/easylist/easyprivacy.txt

ruleset_converter

deleted100755 → 0
−2.92 MiB

File deleted.