Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coursier/cache-migration
CLI tool to migrate a legacy coursier cache to the newer OS-dependent location
https://github.com/coursier/cache-migration
Last synced: about 2 months ago
JSON representation
CLI tool to migrate a legacy coursier cache to the newer OS-dependent location
- Host: GitHub
- URL: https://github.com/coursier/cache-migration
- Owner: coursier
- License: apache-2.0
- Created: 2020-04-29T15:58:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-29T18:00:29.000Z (over 4 years ago)
- Last Synced: 2024-03-17T16:51:28.559Z (9 months ago)
- Language: Scala
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## cache-migration
A CLI tool to migrate a legacy coursier cache, under `~/.coursier/cache`,
to the newer OS-dependent location:
- `~/.cache/coursier` on Linux,
- `~/Library/Caches/Coursier` on macOS,
- `C:\Users\_UserName_\AppData\Local\Coursier\Cache` in most cases on Windows (replace `_UserName_` by your user name - for example, user name `Alex` gives `C:\Users\Alex\AppData\Local\Coursier\Cache`).### Linux / macOS instructions
Run a dry run with
```bash
$ cs launch --contrib cache-migration -- --dry-run
```Really run it with
```bash
$ cs launch --contrib cache-migration
```Optionally, pass `--clean-up` to remove `~/.coursier/cache`, if it's empty
after the migration
```bash
$ cs launch --contrib cache-migration -- --clean-up
```If both the legacy and the newer cache directories exist on your system,
a message will invite you to pass some extra options. As of writing this,
these options are:
- `--one-by-one` (individually moving files from the legacy cache to the newer one) and
- `--clean-up` (removing empty directories from the legacy cache, and the legacy cache itself if it ends up being empty).You should then run `cache-migration` like
```bash
$ cs launch --contrib cache-migration -- --one-by-one --clean-up
```### Windows
Create a launcher for cache-migration with
```bash
cs bootstrap --standalone --contrib cache-migration -o cache-migration
```This creates two files in the current directory:
- `cache-migration`, which is a JAR for cache-migration, and
- `cache-migration.bat`, which launches `cache-migration`.Then follow the Linux and macOS instructions above, replacing `cs launch --contrib cache-migration --` with `.\cache-migration`, like
```bash
.\cache-migration --dry-run
``````bash
.\cache-migration
``````bash
.\cache-migration --clean-up
``````bash
.\cache-migration --one-by-one --clean-up
```