keep version in gecko
This commit is contained in:
parent
349952d116
commit
76675b179a
2 changed files with 4 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,4 +2,4 @@ _build/
|
|||
|
||||
/selenium-*.jar
|
||||
/gecko-*.tar.gz
|
||||
/geckodriver
|
||||
/geckodriver-*
|
||||
|
|
|
@ -57,13 +57,15 @@ type driver = Gecko of string
|
|||
|
||||
let prepare = function
|
||||
| Gecko version_driver ->
|
||||
let driver = "geckodriver" in
|
||||
let driver = fmt "geckodriver-%s" version_driver in
|
||||
if not (Sys.file_exists driver)
|
||||
then (
|
||||
let archive = fmt "./gecko-%s.tar.gz" version_driver in
|
||||
Lwt_main.run (download_gecko_driver version_driver archive);
|
||||
(* TODO: Use native version instead of relying on Unix tools *)
|
||||
let _ = Sys.command (fmt "tar xvzf %s" archive) in
|
||||
let _ = Sys.command (fmt "mv geckodriver %s" driver) in
|
||||
let _ = Sys.command (fmt "rm %s" archive) in
|
||||
());
|
||||
driver
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue