-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from stevegrunwell/release/v0.3.0
Version 0.3.0
- Loading branch information
Showing
15 changed files
with
2,453 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{json,php}] | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.DS_Store | ||
vendor | ||
.DS_Store | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
os: osx | ||
language: shell | ||
|
||
matrix: | ||
include: | ||
- name: macOS 10.15 (Catalina) | ||
osx_image: xcode11.5 | ||
- name: macOS 10.14 (Mojave) | ||
osx_image: xcode11.3 | ||
- name: macOS 10.13 (High Sierra) | ||
osx_image: xcode10.1 | ||
fast_finish: true | ||
|
||
install: | ||
- brew install composer shellcheck | ||
- | | ||
if [[ $(php -r 'echo phpversion() . PHP_EOL;') < 7.3.1 ]]; then | ||
composer update --prefer-lowest --prefer-dist --no-suggest --no-progress --no-ansi | ||
else | ||
composer install --prefer-dist --no-suggest --no-progress --no-ansi | ||
fi | ||
script: | ||
- composer test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Asimov | ||
|
||
[![Build Status](https://travis-ci.com/stevegrunwell/asimov.svg?branch=develop)](https://travis-ci.com/stevegrunwell/asimov) | ||
![Requires macOS 10.13 (High Sierra) or newer](https://img.shields.io/badge/macOS-10.13%20or%20higher-blue) | ||
[![MIT license](https://img.shields.io/badge/license-MIT-green)](LICENSE.txt) | ||
|
||
> Those people who think they know everything are a great annoyance to those of us who do.<br>— Issac Asimov | ||
For macOS users, [Time Machine](https://support.apple.com/en-us/HT201250) is a no-frills, set-it-and-forget-it solution for on-site backups. Plug in an external hard drive (or configure a network storage drive), and your Mac's files are backed up. | ||
|
@@ -8,19 +12,51 @@ For the average consumer, Time Machine is an excellent choice, especially consid | |
|
||
Asimov aims to solve that problem, scanning your filesystem for known dependency directories (e.g. `node_modules/` living adjacent to a `package.json` file) and excluding them from Time Machine backups. After all, why eat up space on your backup drive for something you could easily restore via `npm install`? | ||
|
||
|
||
## Installation | ||
|
||
To get started with Asimov, clone the repository or download and extract an archive anywhere you'd like on your Mac: | ||
Asimov may be installed in a few different ways: | ||
|
||
### Installation via Homebrew | ||
|
||
The easiest way to install Asimov is through [Homebrew](https://brew.sh): | ||
|
||
```sh | ||
$ brew install asimov | ||
``` | ||
|
||
If you would prefer to use the latest development release, you may append the `--head` flag: | ||
|
||
```sh | ||
$ brew install asimov --head | ||
``` | ||
|
||
Once installed, you may instruct Homebrew to automatically load the scheduled job, ensuring Asimov is being run automatically every day: | ||
|
||
```sh | ||
$ git clone [email protected]:stevegrunwell/asimov.git | ||
$ sudo brew services start asimov | ||
``` | ||
|
||
If you don't need or want the scheduled job, you may run Asimov on-demand: | ||
|
||
```sh | ||
$ asimov | ||
``` | ||
|
||
### Manual installation | ||
|
||
If you would prefer to install Asimov manually, you can do so by cloning the repository (or downloading and extracting an archive of the source) anywhere on your Mac: | ||
|
||
```sh | ||
$ git clone https://github.com/stevegrunwell/asimov.git --depth 1 | ||
``` | ||
|
||
After you've cloned the repository, run the `install.sh` script to automatically: | ||
* Symlink Asimov to `/usr/local/bin`, making it readily available from anywhere. | ||
* Schedule Asimov to run once a day, ensuring new projects' dependencies are quickly excluded from Time Machine backups. | ||
* Run Asimov for the first time, finding all current project dependencies adding them to Time Machine's exclusion list. | ||
|
||
|
||
## How it works | ||
|
||
At its essence, Asimov is a simple wrapper around Apple's `tmutil` program, which provides more granular control over Time Machine. | ||
|
@@ -41,4 +77,4 @@ If a directory has been excluded from backups in error, you can remove the exclu | |
|
||
```bash | ||
$ tmutil removeexclusion /path/to/directory | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "stevegrunwell/asimov", | ||
"description": "Automatically exclude development dependencies from Apple Time Machine backups", | ||
"type": "project", | ||
"authors": [ | ||
{ | ||
"name": "Steve Grunwell", | ||
"homepage": "https://stevegrunwell.com" | ||
}, | ||
{ | ||
"name": "Sudar Muthu", | ||
"homepage": "https://sudarmuthu.com" | ||
} | ||
], | ||
"support": { | ||
"source": "https://github.com/stevegrunwell/asimov", | ||
"issues": "https://github.com/stevegrunwell/asimov/issues" | ||
}, | ||
"license": "MIT", | ||
"require": { | ||
"php": ">=7.1" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^7.5|^9.0" | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "sh tests/bin/run-tests.sh" | ||
}, | ||
"scripts-descriptions": { | ||
"test": "Run the automated tests for Asimov." | ||
}, | ||
"config": { | ||
"preferred-install": "dist", | ||
"sort-packages": true | ||
} | ||
} |
Oops, something went wrong.