Skip to content

Commit

Permalink
chore/fix: I hope it works now - CIs suck
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Aurélio da Silva <marcoonroad@gmail.com>
  • Loading branch information
marcoonroad committed Nov 14, 2018
1 parent f6dd44a commit 068ddd1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
10 changes: 2 additions & 8 deletions .travis.yml
Expand Up @@ -7,11 +7,11 @@ script:

env:
global:
- HIEROGLYPHS_ROOT="$HOME/build/marcoonroad/hieroglyphs/.hieroglyphs"
- PACKAGE=hieroglyphs
- UPDATE_GCC_BINUTILS=1
- BISECT_ENABLE=YES
- BISECT_SILENT=YES
- PRE_INSTALL_HOOK="make blacklist"
- POST_INSTALL_HOOK="make report"
matrix:
- OCAML_VERSION=4.04
Expand All @@ -22,12 +22,6 @@ env:
os:
- linux

before_script:
- mkdir -p $HIEROGLYPHS_ROOT
- mkdir -p $HIEROGLYPHS_ROOT/blacklist
- cd $HIEROGLYPHS_ROOT/blacklist && git init --bare --shared && cd $OLDPWD
- chmod -R a+rwx $HIEROGLYPHS_ROOT

cache:
directories:
- $HIEROGLYPHS_ROOT
- $HOME/.hieroglyphs
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -31,10 +31,10 @@ doc: build
# - ALCOTEST_SHOW_ERRORS=1
#
test:
HIEROGLYPHS_ROOT=`pwd`/.hieroglyphs dune build @test/spec/runtest -f --no-buffer -j 1
dune build @test/spec/runtest -f --no-buffer -j 1

bench:
HIEROGLYPHS_ROOT=`pwd`/.hieroglyphs dune build @test/bench/runtest -f --no-buffer -j 1
dune build @test/bench/runtest -f --no-buffer -j 1

install:
dune install
Expand All @@ -56,6 +56,9 @@ report: coverage
opam install ocveralls --yes
ocveralls --prefix '_build/default' `find . -name 'bisect*.out'` --send

blacklist:
irmin init --bare --root=${HOME}/.hieroglyphs/blacklist

clean:
dune clean
# Optionally, remove all files/folders ignored by git as defined
Expand Down
6 changes: 6 additions & 0 deletions TODO.md
@@ -0,0 +1,6 @@
# TODO

- [ ] Base64 encrypted / binary strings.
- [ ] Command-line interface.
- [ ] Support for wide number of Hashes (SHA256, SHA512, BLAKE2B, KECCAK).
- [ ] Local / Dockerized Travis CI build.
12 changes: 2 additions & 10 deletions lib/blacklist.ml
Expand Up @@ -6,12 +6,6 @@ open Lwt.Infix

module Store = Irmin_unix.Git.FS.KV(Irmin.Contents.String)

let split address =
let length = String.length address in
let directory = String.sub ~pos:2 ~len:2 address in
let filename = String.sub ~pos:4 ~len:(length - 4) address in
(directory, filename)

let _CONFIG_DIR = match Sys.getenv "HIEROGLYPHS_ROOT" with
| None -> Sys.getenv_exn "HOME" ^ "/.hieroglyphs"
| Some directory -> directory
Expand All @@ -21,8 +15,7 @@ let config = Irmin_git.config ~bare:true _BLACKLIST_ROOTDIR
let info fmt = Irmin_unix.info fmt

let add address =
let (directory, filename) = split address in
let path = [directory; filename] in
let path = [address] in
let msg = info "Revoking Private Key." in
let transaction ( ) =
Store.Repo.v config >>= function repo ->
Expand All @@ -32,8 +25,7 @@ let add address =
Lwt_main.run (transaction ( ))

let exists address =
let (directory, filename) = split address in
let path = [directory; filename] in
let path = [address] in
let transaction ( ) =
Store.Repo.v config >>= function repo ->
Store.master repo >>= function branch ->
Expand Down

0 comments on commit 068ddd1

Please sign in to comment.