This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const url_reg = r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?" | ||
const gh_path_reg_git=r"^/(.*)?/(.*)?.git$" | ||
|
||
for (pkg, versions) in Pkg2.Read.available() | ||
url = (Pkg2.Read.url(pkg)) | ||
maxv = sort([keys(versions)...])[end] | ||
m=match(url_reg, url) | ||
assert (m != null, "Invalid url $url for package $(pkg). Should satisfy $url_reg") | ||
host=m.captures[4] | ||
assert (host!=nothing , "Invalid url $url for package $(pkg). Cannot extract host") | ||
path=m.captures[5] | ||
assert (path!=nothing , "Invalid url $url for package $(pkg). Cannot extract path") | ||
scheme=m.captures[2] | ||
assert ( ismatch (r"git", scheme) || ismatch (r"http", scheme), "Invalid url scheme $scheme for package $(pkg). Should be 'git' or 'http[s]'") | ||
if ismatch(r"github\.com", host) | ||
m2 = match(gh_path_reg_git, path) | ||
assert (m2 != nothing , "Invalid github url pattern $url for package $(pkg). Should satisfy $gh_path_reg_git") | ||
user=m2.captures[1] | ||
repo=m2.captures[2] | ||
sha1_file = "METADATA/$pkg/versions/$(maxv)/sha1" | ||
@assert isfile(sha1_file) | ||
end | ||
end | ||
|
||
@assert Pkg2.check_metadata() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: cpp | ||
compiler: | ||
- clang | ||
notifications: | ||
email: false | ||
before_install: | ||
- sudo add-apt-repository ppa:staticfloat/julia-deps -y | ||
- sudo add-apt-repository ppa:staticfloat/julianightlies -y | ||
- sudo apt-get update -qq -y | ||
- sudo apt-get install libpcre3-dev julia -y | ||
- git config --global user.name "Travis User" | ||
- git config --global user.email "[email protected]" | ||
script: | ||
- cd .. | ||
- ln -s METADATA.jl METADATA | ||
- julia METADATA/.test/METADATA.jl |