Skip to content
This repository was archived by the owner on Jan 10, 2020. It is now read-only.

Commit 92e70af

Browse files
authored
⚡ Rust rewrite (#2)
This is like the mother of all PRs.
1 parent 4ebbc4d commit 92e70af

File tree

15 files changed

+981
-2838
lines changed

15 files changed

+981
-2838
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GeoLite2-City/GeoLite2-City.mmdb filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules
2+
target
3+
ipapi

.travis.yml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,42 @@
1-
language: node_js
2-
node_js:
3-
- "node"
4-
cache:
5-
directories:
6-
- "node_modules"
7-
script: npm test
8-
before_deploy: npm install now --no-save
1+
os: linux
2+
language: rust
3+
rust:
4+
- stable
5+
cache: cargo
6+
git:
7+
lfs_skip_smudge: true
8+
before_script:
9+
- echo -e "machine github.com\n login $GITHUB_TOKEN" > ~/.netrc
10+
- git lfs pull
11+
script:
12+
- cargo build --release
13+
- cargo test
14+
before_deploy:
15+
- curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
16+
- sudo add-apt-repository "deb https://deb.nodesource.com/node_8.x $(lsb_release -s -c) main" -y
17+
- sudo apt-get update -q
18+
- sudo apt-get install nodejs -y
19+
- sudo npm i -g npm
20+
- sudo npm i -g --unsafe-perm now
921
deploy:
1022
- provider: script
1123
script: now --public --token $NOW_TOKEN
1224
skip_cleanup: true
1325
on:
1426
all_branches: true
15-
master: false
27+
tags: false
28+
condition: $TRAVIS_RUST_VERSION = "stable"
1629
- provider: script
17-
script: now --public --token $NOW_TOKEN && now alias --token $NOW_TOKEN && now rm ipapi --safe --yes --token $NOW_TOKEN
30+
script: now --token $NOW_TOKEN && now alias --token $NOW_TOKEN && now rm ipapi --safe --yes --token $NOW_TOKEN
1831
skip_cleanup: true
1932
on:
20-
master: true
33+
branch: master
34+
tags: true
35+
condition: $TRAVIS_RUST_VERSION = "stable"
36+
- provider: releases
37+
skip_cleanup: true
38+
file: target/release/ipapi
39+
on:
40+
branch: master
41+
tags: true
42+
condition: $TRAVIS_RUST_VERSION = "stable"

0 commit comments

Comments
 (0)