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
|
/selenium-*.jar
|
||||||
/gecko-*.tar.gz
|
/gecko-*.tar.gz
|
||||||
/geckodriver
|
/geckodriver-*
|
||||||
|
|
|
@ -57,13 +57,15 @@ type driver = Gecko of string
|
||||||
|
|
||||||
let prepare = function
|
let prepare = function
|
||||||
| Gecko version_driver ->
|
| Gecko version_driver ->
|
||||||
let driver = "geckodriver" in
|
let driver = fmt "geckodriver-%s" version_driver in
|
||||||
if not (Sys.file_exists driver)
|
if not (Sys.file_exists driver)
|
||||||
then (
|
then (
|
||||||
let archive = fmt "./gecko-%s.tar.gz" version_driver in
|
let archive = fmt "./gecko-%s.tar.gz" version_driver in
|
||||||
Lwt_main.run (download_gecko_driver version_driver archive);
|
Lwt_main.run (download_gecko_driver version_driver archive);
|
||||||
(* TODO: Use native version instead of relying on Unix tools *)
|
(* TODO: Use native version instead of relying on Unix tools *)
|
||||||
let _ = Sys.command (fmt "tar xvzf %s" archive) in
|
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
|
driver
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue