Commit Graph

4 Commits

Author SHA1 Message Date
Michael de Wit fb1d0be64d Fix inconsistent exit code when mounted folder does not exist. Fixes #4 2017-02-03 15:06:29 +01:00
Michael de Wit 4ce79429c6 Add [NO CACHE] and [CLEAR CACHE] to commit message options to control plugin behavior, use separate cache for matrix jobs. Fixes #3 2017-02-01 14:42:55 +01:00
Adrien Vergé 9585fa84d1 Use rsync -aHAX --delete
When creating/restoring cache, the user wants the created files and dir
to *replace* existing ones. This also implies deleting leftover files.

To be clearer, let's take an example with a JS / TypeScript project:
- A project needs to install some "typings" named `footypes` in
  `node_modules`.
- `footypes` becomes deprecated and should be replaced by `footypes2`.
  The developer then replaces `footypes` with `footypes2` in his
  `package.json`.
- On next builds, old cache is restored (including
  `node_modules/footypes`). Then `footypes2` is also installed in
  `node_modules`.
- Builds now fail because there are conflicting typings for library
  `foo`: both `footypes` and `footypes2` are present.

With the `--delete` flag added to `rsync`, when creating new caches,
files that are not present in source dir are deleted from target dir.
2016-12-13 15:20:57 +01:00
Michael de Wit 13f372a63c add project 2016-12-07 11:45:05 +01:00