Skip to content

Commit

Permalink
Revert to single release tarball and update INSTALL.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mstilkerich committed Jun 26, 2022
1 parent 80383d3 commit 781f3dd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,10 @@ tarball:
composer create-project --repository='{"type":"vcs", "url":"file://$(PWD)" }' -q --no-install --no-dev --no-plugins roundcube/carddav releases/carddav $(RELEASE_VERSION)
cd releases/carddav && \
jq -s '.[0] * .[1] | del(."require-dev")' composer.json .github/configs/composer-build-release.json >composer-release.json &&\
COMPOSER=composer-release.json composer install -q --no-dev --optimize-autoloader
@# Tar the release with up-to-date dependencies as roundcube 1.6+ release tarball
cp releases/carddav-$(RELEASE_VERSION).tar releases/carddav-$(RELEASE_VERSION)-roundcube16.tar
tar -C releases --owner 0 --group 0 -rf releases/carddav-$(RELEASE_VERSION)-roundcube16.tar carddav/vendor
@# Force a Guzzle version compatible with roundcube 1.5 (^6.5.5)
cd releases/carddav && composer require -q --optimize-autoloader --update-no-dev --update-with-dependencies 'guzzlehttp/guzzle:^6.5.5'
@# Append dependencies to the 1.5 tar
cp releases/carddav-$(RELEASE_VERSION).tar releases/carddav-$(RELEASE_VERSION)-roundcube15.tar
tar -C releases --owner 0 --group 0 -rf releases/carddav-$(RELEASE_VERSION)-roundcube15.tar carddav/vendor
@# gzip the tarballs
gzip -v releases/carddav-$(RELEASE_VERSION)*.tar
COMPOSER=composer-release.json composer update -q --no-dev --optimize-autoloader
tar -C releases --owner 0 --group 0 -rf releases/carddav-$(RELEASE_VERSION).tar carddav/vendor
@# gzip the tarball
gzip -v releases/carddav-$(RELEASE_VERSION).tar

define EXECDBSCRIPT_postgres
sed -e 's/TABLE_PREFIX//g' $(2) | $(PSQL) $(1)
Expand Down
28 changes: 13 additions & 15 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ installation):
- Log out of Roundcube!
This is important because RCMCardDAV runs its database initialisation / update procedure only when a user logs in!
- Get [composer](https://getcomposer.org/download/)
- Install RCMCardDAV via composer.
- Add dependency to the `require` array in the `composer.json` file of your roundcube
- If you want to use released versions only, add: `"roundcube/carddav": "*"`. For more specific version constraints,
see the [composer documentation](https://getcomposer.org/doc/articles/versions.md).
- If you want to use the current development version from git, add: `"roundcube/carddav": "dev-master"`
- Install with `php composer.phar install --no-dev`. When updating, use `php composer.phar update --no-dev` instead.
- Install RCMCardDAV via composer: `php composer.phar require --update-no-dev -o "roundcube/carddav:*"`
- If you want to use released versions only, use `"roundcube/carddav": "*"`. For more specific version constraints,
see the [composer documentation](https://getcomposer.org/doc/articles/versions.md).
- If you want to use the current development version from git, use `"roundcube/carddav": "dev-master"`
- If composer asks you whether you want to enable the plugin in the roundcube configuration, say __y__.
- You should now find the plugin installed under `plugins/carddav`
- [Configure](#configuration) the plugin if needed.
Expand All @@ -45,6 +43,13 @@ installation):

In case of errors, check the files `logs/*`.

### Update using composer

To update RCMCardDAV using composer, simply run `php composer.phar update --no-dev -o roundcube/carddav`.
- Note that this will only upgrade RCMCardDAV within the version constraints listed in `composer.json`. You made this
choice when you ran `composer require`. If you want to change the version constraint, simply run `composer require`
again with the updated version constraint, e.g. the same command you would use for initial installation.

## Installation from release tarball

Releases of RCMCardDAV are also provided as a tarball than can be extracted to roundcube's plugin directory.
Expand All @@ -54,18 +59,11 @@ inside that tarball for the appropriate instructions.

- Log out of Roundcube!
This is important because RCMCardDAV runs its database initialisation / update procedure only when a user logs in!
- Choose the correct release tarball
- For roundcube version 1.5, or if your PHP version is older than PHP 7.2.5, use `carddav-vX.Y.Z-roundcube15.tar.gz`
- Otherwise, use `carddav-vX.Y.Z-roundcube16.tar.gz`
- The difference between the two is only in the included dependencies. The 1.5 version includes an older version of
the Guzzle HTTP client library as used by roundcube 1.5. Roundcube versions older than 1.5 do not use Guzzle, so you
can use the 1.6 tarball with the current Guzzle if your PHP version is recent enough for Guzzle v7 (PHP 7.2.5).
- Note: Release tarballs prior to v4.4.0 are only provided in a single version including Guzzle v6.
- Download the release tarball from [here](https://github.com/mstilkerich/rcmcarddav/releases)
- Note: The correct tarball is named `carddav-vX.Y.Z-roundcube1V.tar.gz`. Do not use the "Source code" tar.gz or zip
- Note: The correct tarball is named `carddav-vX.Y.Z.tar.gz`. Do not use the "Source code" tar.gz or zip
files, these are only exports of the repository. Unfortunately, github creates these automatically for each release.
- Extract the tarball to the roundcube/plugins directory (assuming roundcube is installed at `/var/lib/roundcube`)
`cd /var/lib/roundcube/plugins && tar xvzf /tmp/carddav-v4.1.0-roundcube16.tar.gz`
`cd /var/lib/roundcube/plugins && tar xvzf /tmp/carddav-v4.4.2.tar.gz`
- [Configure](#configuration) the plugin if needed.
- Enable RCMCardDAV in Roundcube
Open the file `config/config.inc.php` and add `carddav` to the array `$config['plugins']`.
Expand Down

0 comments on commit 781f3dd

Please sign in to comment.