Skip to content

Commit

Permalink
Merge branch 'release/1.6.51' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed May 19, 2023
2 parents c5aa107 + 89e6645 commit 4f34bf7
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and Deploy Docs
env:
DOCS_DEST_DIR: /image-optimize/
DOCS_DEST_DIR: /image-optimize/v3/
on:
push:
branches:
Expand All @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: true
matrix:
node-version: [14.x]
node-version: [ 14.x ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -35,7 +35,7 @@ jobs:
- name: rsync deployments
uses: burnett01/rsync-deployments@4.1
with:
switches: -avzr --delete
switches: -avzr
path: ./dist/
remote_path: ${{ secrets.NYS_DOCS_ROOT }}${{ env.DOCS_DEST_DIR }}
remote_host: ${{ secrets.NYS_DEPLOY_REMOTE_HOST }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create Release
run-name: Create release for ${{ github.event.client_payload.version }}

on:
repository_dispatch:
types:
- craftcms/new-release

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: ncipollo/release-action@v1
with:
body: ${{ github.event.client_payload.notes }}
makeLatest: ${{ github.event.client_payload.latest }}
name: ${{ github.event.client_payload.version }}
prerelease: ${{ github.event.client_payload.prerelease }}
tag: ${{ github.event.client_payload.tag }}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ImageOptimize Changelog

## 1.6.51 - 2023.05.19
### Changed
* Automate release generation via GitHub action
* Add versioning to the docs

### Fixed
* Remove the old Craft generated transform that's still sitting in the temp directory ([#380](https://github.com/nystudio107/craft-imageoptimize/pull/380))

## 1.6.50 - 2023.02.09
### Changed
* Use dynamic docker container name & port for the `buildchain`
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-imageoptimize",
"description": "Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like imgix, with zero template changes.",
"type": "craft-plugin",
"version": "1.6.50",
"version": "1.6.51",
"keywords": [
"craft",
"cms",
Expand Down
8 changes: 7 additions & 1 deletion docs/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defineConfig} from 'vitepress'
export default defineConfig({
title: 'ImageOptimize Plugin',
description: 'Documentation for the ImageOptimize plugin',
base: '/docs/image-optimize/',
base: '/docs/image-optimize/v3/',
lang: 'en-US',
head: [
['meta', {content: 'https://github.com/nystudio107', property: 'og:see_also',}],
Expand Down Expand Up @@ -44,6 +44,12 @@ export default defineConfig({
{text: 'Store', link: 'https://plugins.craftcms.com/image-optimize'},
{text: 'Changelog', link: 'https://nystudio107.com/plugins/imageoptimize/changelog'},
{text: 'Issues', link: 'https://github.com/nystudio107/craft-imageoptimize/issues'},
{
text: 'v3', items: [
{text: 'v4', link: 'https://nystudio107.com/docs/image-optimize/'},
{text: 'v3', link: '/'},
],
},
],
},
});
7 changes: 6 additions & 1 deletion src/ImageOptimize.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,14 @@ function (GenerateTransformEvent $event) {
__METHOD__
);
// Return the path to the optimized image to _createTransformForAsset()
$event->tempPath = ImageOptimize::$plugin->optimize->handleGenerateTransformEvent(
$tempPath = ImageOptimize::$plugin->optimize->handleGenerateTransformEvent(
$event
);
if ($tempPath) {
// Remove the old Craft generated transform that's still sitting in the temp directory.
@unlink($event->tempPath);
$event->tempPath = $tempPath;
}
}
);

Expand Down

0 comments on commit 4f34bf7

Please sign in to comment.