Skip to content

Commit 8e1928d

Browse files
committed
Migrate to Github Action
1 parent ba42fd5 commit 8e1928d

File tree

15 files changed

+52
-263
lines changed

15 files changed

+52
-263
lines changed

.github/workflows/lib/yaml_to_json.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# PROPRIETARY AND CONFIDENTIAL
4+
#
5+
# Unauthorized copying of this project via any medium is strictly prohibited.
6+
#
7+
# Copyright (c) 2020-2020 Snowplow Analytics Ltd. All rights reserved.
8+
9+
# Generate the JSON equivalent of the yaml file with the list of referers
10+
11+
import sys
12+
import json
13+
import yaml
14+
15+
if len(sys.argv) != 3:
16+
print 'USAGE: yaml_to_json.py <input_referers.yaml> <output_referers.json>'
17+
print '2 arguments must be specified'
18+
print 'Arguments:'
19+
print sys.argv[1:]
20+
sys.exit(1)
21+
22+
input_yaml = sys.argv[1]
23+
output_json = sys.argv[2]
24+
25+
referers = yaml.load(open(input_yaml))
26+
json = json.dumps(referers, sort_keys = False, indent = 4)
27+
28+
print "writing to {0} ".format(output_json)
29+
with open(output_json, 'w') as f:
30+
f.write(json)

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: test
2+
3+
on: pull_request
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: '3.10'
14+
- name: Convert yaml to json
15+
run: python .github/workflows/lib/yaml_to_json.py resources/referers.yml referers.json
16+
- name: Check
17+
run: ls

.gitignore

Lines changed: 0 additions & 17 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@ The latest database is always available on this URL:
1717
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-latest.yaml
1818
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-latest.json
1919

20-
The database is updated at most once a month. Each new version of the database is also uploaded with a timestamp:
20+
The database is updated every day. Each new version of the database is also uploaded with a timestamp:
2121

2222
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-YYYYMMDD.yaml
2323
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-YYYYMMDD.json
2424

2525
Example:
26+
2627
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-20200331.yaml
2728
https://s3-eu-west-1.amazonaws.com/snowplow-hosted-assets/third-party/referer-parser/referers-20200331.json
2829

29-
If there is an issue with the database necessitating a re-release within the month, the corresponding files will be overwritten.
30-
3130
## Language-specific repositories
3231

3332
- Scala: https://github.com/snowplow-referer-parser/scala-referer-parser
@@ -78,9 +77,7 @@ We welcome contributions to referer-parser:
7877

7978
## Support
8079

81-
General support for referer-parser is handled by the team at Snowplow Analytics Ltd.
82-
83-
You can contact the Snowplow Analytics team through any of the [channels listed on their wiki][talk-to-us].
80+
General support for `referer-parser` is handled by Snowplow Analytics team on [discourse][discourse].
8481

8582
## Copyright and license
8683

@@ -90,6 +87,8 @@ You can contact the Snowplow Analytics team through any of the [channels listed
9087

9188
[snowplow]: https://github.com/snowplow/snowplow
9289

90+
[discourse]: https://discourse.snowplow.io
91+
9392
[piwik]: http://piwik.org
9493
[piwik-search-engines]: https://github.com/piwik/piwik/blob/master/core/DataFiles/SearchEngines.php
9594
[piwik-socials]: https://github.com/piwik/piwik/blob/master/core/DataFiles/Socials.php

Vagrantfile

Lines changed: 0 additions & 19 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

sync_data.py

Lines changed: 0 additions & 103 deletions
This file was deleted.

vagrant/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)