Test on Julia nightly fails - ERROR: UndefVarError: clone not defined

I am trying to update the CI and documentation of Observables.jl. To update the travis script, I used PkgTemplates. The following is the result:

# Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
  - linux
  - osx
julia:
  - 0.7
  - 1.0
  - 1.3
  - nightly
matrix:
  allow_failures:
    - julia: nightly
notifications:
  email: false
after_success:
  - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
  - julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'
jobs:
  include:
    - stage: Documentation
      julia: 1.0
      script: julia --project=docs -e '
          using Pkg;
          Pkg.develop(PackageSpec(path=pwd()));
          Pkg.instantiate();
          include("docs/make.jl");'
      after_success: skip

My problem is that the testing fails on nightly builds of Julia. The error:

$ julia --color=yes -e "VERSION >= v\"0.7.0-DEV.5183\" && using Pkg; Pkg.clone(pwd()); if VERSION >= v\"1.1.0-rc1\"; Pkg.build(\"${JL_PKG}\"; verbose=true); else Pkg.build(\"${JL_PKG}\"); end"
ERROR: UndefVarError: clone not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at none:1
The command "julia --color=yes -e "VERSION >= v\"0.7.0-DEV.5183\" && using Pkg; Pkg.clone(pwd()); if VERSION >= v\"1.1.0-rc1\"; Pkg.build(\"${JL_PKG}\"; verbose=true); else Pkg.build(\"${JL_PKG}\"); end"" failed and exited with 1 during .

Builds are here. Tests also fail on AppVeyor on the nightly builds with the same error (see here).

What did I do wrong?
cc-ing @staticfloat, @StefanKarpinski