Misleading dpl v2 deprecation warnings with v1 config

In the following config:

  provider: pages
  skip_cleanup: true
  local_dir: book
  github_token: $GITHUB_TOKEN

This warnings appears:

deploy: deprecated key skip_cleanup (not supported in dpl v2, use cleanup)


As a naive user, I then:

  • Read the cleanup docs
  • Converted skip_cleanup:true to cleanup:false
  • Realized that this was the default value
  • Removed this unnecessary default

I did not realize that I should have simply ignored that deprecation warning, because I was not actually using dpl v2.

It would be better to suppress these v2 deprecation warnings unless v2 is actually being used in the config with edge:true.

This would have spared me a bunch of troubleshooting effort chasing down this non-obvious cleanup-related error. It’s especially confusing that rsync complains about a missing book directory that git clearly lists as existing:

Deploying application
Initialized empty Git repository in /tmp/d20200414-4139-11ora7j/work/.git/
Switched to a new branch 'gh-pages'
cd -
cd /tmp/d20200414-4139-11ora7j/work
rsync: change_dir "/home/travis/build/milesfrain/purescript-book/book" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]

Already up to date!
HEAD detached at 1796575
Untracked files:
  (use "git add <file>..." to include in what will be committed)


nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/stash@{0} (7c55383b486a956992a842b7a11812a65b4e482a)
Could not copy /home/travis/build/milesfrain/purescript-book/book.
failed to deploy