Skip to content

Commit

Permalink
Merge pull request #32 from moderntribe/fix/function-mocker-cache-issues
Browse files Browse the repository at this point in the history
Use the /cache dir provided by the codeception image for function-mocker
  • Loading branch information
lucatume authored Aug 5, 2020
2 parents 19ae1ed + 0ee7ad5 commit 50f118f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.1] - 2020-08-04
### Changed

- Fix an issue where the `function-mocker-cache` volume would be mounted with `root` ownership on Linux systems causing Function Mocker to fail while trying to set up cache in plugins that use it.


## [0.5.0] - 2020-07-30
### Added

Expand Down
2 changes: 1 addition & 1 deletion tric
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $args = args( [
] );

$cli_name = basename( $argv[0] );
const CLI_VERSION = '0.5.0';
const CLI_VERSION = '0.5.1';

$cli_header = implode( ' - ', [
light_cyan( $cli_name ) . ' version ' . light_cyan( CLI_VERSION ),
Expand Down
5 changes: 4 additions & 1 deletion tric-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ services:
# Let's set the lines and columns number explicitly to have the shell mirror the current one.
LINES: "${LINES:-24}"
COLUMNS: "${COLUMNS:-80}"
# Explicitly set the env var that will define the Function Mocker cache path: it will be picked up by the config file.
FUNCTION_MOCKER_CACHE_PATH: "/cache"
depends_on:
- wordpress
- chrome
Expand All @@ -173,7 +175,8 @@ services:
# In some plugins we use function-mocker and set it up to cache in `/tmp/function-mocker`.
# To avoid a long re-caching on each run, let's cache in a docker volume, caching on the host
# filesystem would be a worse cure than the disease.
- function-mocker-cache:/tmp/function-mocker
# The volume is bound to the `a+rwx` directory the `codeception` image provides to avoid file mode issues.
- function-mocker-cache:/cache

composer:
image: lucatume/composer:php7.0
Expand Down

0 comments on commit 50f118f

Please sign in to comment.