README.md
author Erika Uscategui <e.uscategui@eyeo.com>
Tue, 03 Dec 2024 15:50:56 +0100
changeset 25722 109716a5bf4d
parent 25717 b6fa5201d082
permissions -rw-r--r--
Paused domains for Uponit ads https://eyeo.atlassian.net/browse/INFRACOM-21742
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25704
4c03dcd1e5aa Initial commit for domains variables
eyeokg <k.galczynski@eyeo.com>
parents:
diff changeset
     1
# Exceptionrules
4c03dcd1e5aa Initial commit for domains variables
eyeokg <k.galczynski@eyeo.com>
parents:
diff changeset
     2
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
     3
This project contains filter rules for the Acceptable Ads program.
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
     4
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
     5
***IMPORTANT:*** After cloning the project, follow the installation steps in order for the pre-commit hook to work.
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
     6
25704
4c03dcd1e5aa Initial commit for domains variables
eyeokg <k.galczynski@eyeo.com>
parents:
diff changeset
     7
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
     8
## Installation
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
     9
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    10
### Windows
25704
4c03dcd1e5aa Initial commit for domains variables
eyeokg <k.galczynski@eyeo.com>
parents:
diff changeset
    11
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    12
1. Turn on Developer Mode in `Settings -> System -> For developers`.
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    13
2. Run the following commands in order to set up the linux subsystem environment and create a symbolic link for the pre-commit hook:
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    14
25711
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    15
```sh
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    16
export MSYS=winsymlinks:nativestrict
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    17
wsl --update
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    18
wsl --install -d Ubuntu-24.04
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    19
wsl -s Ubuntu-24.04
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    20
wsl sudo apt update
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    21
wsl sudo apt install jq
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    22
ln -s -f "$(pwd)/pre-commit-src/pre-commit" "$(pwd)/.git/hooks/pre-commit"
25711
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    23
```
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    24
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    25
### macOS
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    26
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    27
The script requires a newer version of bash, which is not the default on macOS. Install it using Homebrew and create a symbolic link for the pre-commit hook::
25711
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    28
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    29
```sh
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    30
brew install bash
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    31
ln -s -f "$(pwd)/pre-commit-src/pre-commit" "$(pwd)/.git/hooks/pre-commit"
25711
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    32
```
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    33
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    34
### Linux
25711
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    35
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    36
Everything should work out of the box. Create a symbolic link for the pre-commit hook:
25711
2bb339143f01 Added OS specific code and performance improvements
KrzGalcz <k.galczynski@eyeo.com>
parents: 25707
diff changeset
    37
25704
4c03dcd1e5aa Initial commit for domains variables
eyeokg <k.galczynski@eyeo.com>
parents:
diff changeset
    38
```sh
25707
2a19e3a985b6 Moved pre-commit files and added first test
eyeokg <k.galczynski@eyeo.com>
parents: 25705
diff changeset
    39
ln -s -f "$(pwd)/pre-commit-src/pre-commit" "$(pwd)/.git/hooks/pre-commit"
25704
4c03dcd1e5aa Initial commit for domains variables
eyeokg <k.galczynski@eyeo.com>
parents:
diff changeset
    40
```
25705
d7bf4e5f34aa Improved pre-commit check
eyeokg <k.galczynski@eyeo.com>
parents: 25704
diff changeset
    41
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    42
## Adding New Domain Variables Files
25705
d7bf4e5f34aa Improved pre-commit check
eyeokg <k.galczynski@eyeo.com>
parents: 25704
diff changeset
    43
25717
b6fa5201d082 Improved readme
eyeokg <k.galczynski@eyeo.com>
parents: 25711
diff changeset
    44
When adding or renaming files, remember to update the template files and inform the team responsible for delivering the filterlist.