From 0d778aaf9e85ff501ce529c37407fff6fd759506 Mon Sep 17 00:00:00 2001 From: Zhizhen He Date: Thu, 20 Oct 2022 21:48:50 +0800 Subject: [PATCH] Change style for MD029 from one to ordered (#1872) --- .mdl_style.rb | 4 ++++ .mdlrc | 1 + INSTALL.md | 2 +- README.md | 4 ++-- doc/README.md | 6 ++--- doc/configuration_merge_guide.md | 22 +++++++++---------- doc/release.md | 14 ++++++------ tests/README.md | 2 +- .../com~apple~CloudDocs/_blank_.md | 2 +- 9 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 .mdl_style.rb create mode 100644 .mdlrc diff --git a/.mdl_style.rb b/.mdl_style.rb new file mode 100644 index 000000000..87660f6eb --- /dev/null +++ b/.mdl_style.rb @@ -0,0 +1,4 @@ +all +rule 'MD007', :indent => 2 +rule 'MD029', :style => :ordered +exclude_rule 'MD041' diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 000000000..8f1aa6109 --- /dev/null +++ b/.mdlrc @@ -0,0 +1 @@ +style './.mdl_style.rb' diff --git a/INSTALL.md b/INSTALL.md index a52949a80..7ca9edb90 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -3,7 +3,7 @@ There are 2 ways to run mackup 1. Install it with Homebrew (OSX only) -1. Install it with PIP (OSX and GNU/Linux) +2. Install it with PIP (OSX and GNU/Linux) ## Install diff --git a/README.md b/README.md index 45e38732b..cbe0d9ce9 100644 --- a/README.md +++ b/README.md @@ -123,8 +123,8 @@ folder, in the `.gitconfig` file. If you have Dropbox, these things happen when you launch `mackup backup`: 1. `cp ~/.gitconfig ~/Dropbox/Mackup/.gitconfig` -1. `rm ~/.gitconfig` -1. `ln -s ~/Dropbox/Mackup/.gitconfig ~/.gitconfig` +2. `rm ~/.gitconfig` +3. `ln -s ~/Dropbox/Mackup/.gitconfig ~/.gitconfig` Now your `git` config is always backed up and up to date on all your workstations. diff --git a/doc/README.md b/doc/README.md index 605182b8a..405e08b6f 100644 --- a/doc/README.md +++ b/doc/README.md @@ -114,9 +114,9 @@ If you ever change your mind and switch storage solutions after Mackup is already setup (ex: from `dropbox` to `icloud`), complete the following steps. 1. Run `mackup uninstall` on all computers -1. Copy your Mackup files to the new storage location -1. Change the storage provider details in your `.mackup.cfg` file (see above) -1. Run `mackup backup` on the main computer and `mackup restore` on all others +2. Copy your Mackup files to the new storage location +3. Change the storage provider details in your `.mackup.cfg` file (see above) +4. Run `mackup backup` on the main computer and `mackup restore` on all others ## Applications diff --git a/doc/configuration_merge_guide.md b/doc/configuration_merge_guide.md index 769f182aa..25daf61f2 100644 --- a/doc/configuration_merge_guide.md +++ b/doc/configuration_merge_guide.md @@ -23,11 +23,11 @@ First, pick the app you wish to keep in sync. Then determine which configuration files will be synced for that application by doing the following: 1. [Install Mackup](./../INSTALL.md) -1. Create a `.mackup.cfg` file in your home directory -1. Add the following two lines to `.mackup.cfg`. Replace **bash** +2. Create a `.mackup.cfg` file in your home directory +3. Add the following two lines to `.mackup.cfg`. Replace **bash** in the example below with the name of your application. -``` +```text [applications_to_sync] bash ``` @@ -35,7 +35,7 @@ bash You can get a list of supported apps by running `mackup list`. 1. Save the file -1. Run the following command: +2. Run the following command: `mackup --dry-run --verbose backup` @@ -64,9 +64,9 @@ from other machines. 1. Create a backup of each machine's configuration files for the app you wish to sync. -1. Choose a machine that will serve as the initial "master". It doesn't really +2. Choose a machine that will serve as the initial "master". It doesn't really matter which one. -1. Edit your configuration files on the master machine so that they +3. Edit your configuration files on the master machine so that they represent the ideal version of the file you wish to distribute out to your other machines. @@ -80,7 +80,7 @@ for your application on all machines. ##### Sample backup commands for Machine A** -``` +```bash mkdir ~/bash_backup cp ~/.bash_profile ~/bash_backup/bash_profile.bak cp ~/.bash_login ~/bash_backup/bash_login.bak @@ -90,7 +90,7 @@ cp ~/.bash_login ~/bash_backup/bash_login.bak ##### Sample backup commands for Machine B -``` +```bash mkdir ~/bash_backup cp ~/.bash_profile ~/bash_backup/bash_profile.bak cp ~/.bash_login ~/bash_backup/bash_login.bak @@ -102,7 +102,7 @@ Machine A will be our master so we now edit the existing configuration files on Machine A. We will use the vim text editor to do this for each of our configuration files: -``` +```bash vim .bash_profile vim .bash_login ``` @@ -118,7 +118,7 @@ from the master machine. 1. Choose a machine that will serve as the initial "master". You'll probably want to use choose the machine you use most and like its configuration settings the best. -1. For each machine that aren't the "master" (i.e. "slaves"), back up all the +2. For each machine that aren't the "master" (i.e. "slaves"), back up all the configuration files for each app that you want to sync. That's it for now. However, there will be more work for you later. @@ -132,7 +132,7 @@ Machine B: ##### Sample backup commands for Machine B** -``` +```bash mkdir ~/bash_backup cp ~/.bash_profile ~/bash_backup/bash_profile.bak cp ~/.bash_login ~/bash_backup/bash_login.bak diff --git a/doc/release.md b/doc/release.md index ae6167c9a..b64332a7a 100644 --- a/doc/release.md +++ b/doc/release.md @@ -1,9 +1,9 @@ # Release - 1. Move all the WIP changes under a new version in the [changelog](../CHANGELOG.md) - 1. Increment the version in [constants.py](../mackup/constants.py) - 1. `git commit` with the message `Mackup X.Y.Z` - 1. `git tag ` - 1. `git push` - 1. `git push --tags` - 1. `make release` +1. Move all the WIP changes under a new version in the [changelog](../CHANGELOG.md) +2. Increment the version in [constants.py](../mackup/constants.py) +3. `git commit` with the message `Mackup X.Y.Z` +4. `git tag ` +5. `git push` +6. `git push --tags` +7. `make release` diff --git a/tests/README.md b/tests/README.md index da7f90054..d27f371d0 100644 --- a/tests/README.md +++ b/tests/README.md @@ -14,7 +14,7 @@ pipenv run make test And you should see -``` +```text . ---------------------------------------------------------------------- Ran 1 test in 0.016s diff --git a/tests/fixtures/Library/Mobile Documents/com~apple~CloudDocs/_blank_.md b/tests/fixtures/Library/Mobile Documents/com~apple~CloudDocs/_blank_.md index 6a23f9455..06c937b02 100644 --- a/tests/fixtures/Library/Mobile Documents/com~apple~CloudDocs/_blank_.md +++ b/tests/fixtures/Library/Mobile Documents/com~apple~CloudDocs/_blank_.md @@ -1 +1 @@ -Blank file for git sync \ No newline at end of file +Blank file for git sync