Skip to content

Commit

Permalink
Merge branch 'fix-warnings' of https://github.com/vbmithr/ocaml-uri i…
Browse files Browse the repository at this point in the history
…nto gasche-silence-warnings
  • Loading branch information
avsm committed Jan 11, 2018
2 parents b912586 + 8b81ff8 commit 5a2b14d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
v1.9.6 2018-01-11
-----------------

* Change code generation strategy to avoid big switches in
the services file; improves build time by 10x (#114 by @gasche).
* Remove deprecated function use (`String.lowercase`)
* Add development Makefile with more targets.

v1.9.5 2017-11-05
-----------------

Expand Down
46 changes: 42 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
.PHONY: all clean
.PHONY: build clean test

all:
jbuilder build
build:
jbuilder build @install --dev

test:
jbuilder runtest

install:
jbuilder install

uninstall:
jbuilder uninstall

clean:
rm -rf _build *.install lib/uri_services.ml lib/uri_services_full.ml
jbuilder clean

doc:
jbuilder build @doc

publish-doc: doc
rm -rf .gh-pages
git clone `git config --get remote.origin.url` .gh-pages --reference .
git -C .gh-pages checkout --orphan gh-pages
git -C .gh-pages reset
git -C .gh-pages clean -dxf
cp -r _build/default/_doc/* .gh-pages/
git -C .gh-pages add .
git -C .gh-pages commit -m "Update Pages"
git -C .gh-pages push origin gh-pages -f
rm -rf .gh-pages

test-all:
sh ./.docker-run.sh

REPO=../../mirage/opam-repository
PACKAGES=$(REPO)/packages
# until we have https://github.com/ocaml/opam-publish/issues/38
pkg-%:
topkg opam pkg -n $*
mkdir -p $(PACKAGES)/$*
cp -r _build/$*.* $(PACKAGES)/$*/
cd $(PACKAGES) && git add $*

PKGS=$(basename $(wildcard *.opam))
opam-pkg:
$(MAKE) $(PKGS:%=pkg-%)

4 changes: 2 additions & 2 deletions lib/uri.ml
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ end = struct
if c > 9
then if c > 16 && c < 23
then c - 7
else raise (Failure "int_of_hex_char")
else failwith "int_of_hex_char"
else if c >= 0
then c
else raise (Failure "int_of_hex_char")
else failwith "int_of_hex_char"

(** Scan for percent-encoding and convert them into ASCII.
@return a percent-decoded string *)
Expand Down

0 comments on commit 5a2b14d

Please sign in to comment.