Skip to content

Commit

Permalink
Documented self update feature
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Feb 17, 2024
1 parent 5427597 commit 17279fc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.10
current_version = 0.2.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize = {major}.{minor}.{patch}

Expand Down
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ See the [latest release](https://github.com/RhetTbull/applecrate/releases/latest

Note: I've not yet figured out how to create a universal binary with PyApp so you'll need to download the correct installer package for your platform, e.g. `applecrate-0.1.7-x86_64-installer.pkg` for Intel Macs and `applecrate-0.1.7-arm64-installer.pkg` for Apple Silicon Macs.

The installer package will add the `applecrate` command line tool to `/usr/local/bin`. You can upgrade to a new version of AppleCrate by running `applecrate self update` (this only works if you installed AppleCrate with the installer package).
The installer package will add the `applecrate` command line tool to `/usr/local/bin`. You can upgrade to a new version of AppleCrate by running `applecrate update`.

Alternatively, you can install AppleCrate with `pip` or `pipx`:

Expand All @@ -26,6 +26,16 @@ or
pipx install applecrate
```

## Upgrading

AppleCrate includes a self-update command to upgrade your installation to the latest version of AppleCrate. This works for both the binary installer package and the `pip` or `pipx` installation.

```bash
applecrate update
```

If you are interested in implementing this in your own Python package, see the [implementation](https://github.com/RhetTbull/applecrate/blob/main/applecrate/selfupdate.py).

## Simple Example

```bash
Expand Down Expand Up @@ -116,13 +126,13 @@ Options:
install the file 'dist/app' to
'/usr/local/bin/app-1.0.0' if --app=app and
--version=1.0.0.
-k, --link SRC TARGET Create a symbolic link from SRC to DEST after
installation. SRC and TARGET must be absolute
paths and both may include template variables
{{ app }} and {{ version }}. For example:
`--link "/Library/Application Support/{{ app
}}/{{ version }}/app" "/usr/local/bin/{{ app
}}-{{ version }}"`
-k, --link SRC TARGET Create a symbolic link from SRC to TARGET
after installation. SRC and TARGET must be
absolute paths and both may include template
variables {{ app }} and {{ version }}. For
example: `--link "/Library/Application
Support/{{ app }}/{{ version }}/app"
"/usr/local/bin/{{ app }}-{{ version }}"`
-p, --pre-install FILE Path to pre-install shell script; if not
provided, a pre-install script will be created
for you.
Expand Down
4 changes: 2 additions & 2 deletions applecrate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# The version in this file will be updated by bump2version

app = "applecrate"
version = "0.1.10"
version = "0.2.0"
identifier = "org.rhettbull.applecrate"
license = "LICENSE"
install = [
[
"build/applecrate-0.1.10-{{ machine }}",
"build/applecrate-0.2.0-{{ machine }}",
"/usr/local/bin/applecrate",
],
]
Expand Down
2 changes: 1 addition & 1 deletion applecrate/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.10"
__version__ = "0.2.0"

0 comments on commit 17279fc

Please sign in to comment.