Skip to content

Commit

Permalink
fix 1.15.1 release (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNikiforov authored Jul 16, 2023
1 parent 1a6601a commit 0525fcf
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
push: true
tags: |
icloudpd/icloudpd:latest
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

## 1.15.1 (2023-07-16)

- fix: excessive logging for existing and deduplicated files
- fix: add missing docker platforms back

## 1.15.0 (2023-07-16)

- fix: logs when progress bar enabled
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ scripts/build
Building platform executables:

``` sh
scripts/build_bin_linux 1.15.0 amd64
scripts/build_bin_linux 1.15.1 amd64
```
Note: that command is for Linux, including devcontainers. Windows & MacOS scripts must be executed on respective platforms.

Building Python wheels (with single executables; platform-specific):

``` sh
scripts/build_binary_dist_linux 1.15.0
scripts/build_binary_dist_linux 1.15.1
```
Note: that the step expects executables to be already prepared by previous step

Building NPM packages (with single executables; platform-specific):

``` sh
scripts/build_npm 1.15.0
scripts/build_npm 1.15.1
```
Note: that the step expects executables to be already prepared by previous steps

Expand Down
6 changes: 3 additions & 3 deletions EXPERIMENTAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ Legacy command (compatible with prior versions):

`docker run -it --rm icloudpd:icloudpd icloud --help`

`icloudpd-1.15.0-windows-amd64 --help`
`icloudpd-1.15.1-windows-amd64 --help`

Help:

`docker run -it --rm icloudpd:icloudpd`

`icloudpd-ex-1.15.0-windows-amd64 --help`
`icloudpd-ex-1.15.1-windows-amd64 --help`

Example:

`docker run -it --rm icloudpd:icloudpd copy [email protected] /path/to/{album}/{date_created:%Y/%Y-%m}`

`icloudpd-ex-1.15.0-windows-amd64 copy [email protected] /path/to/{album}/{date_created:%Y/%Y-%m}`
`icloudpd-ex-1.15.1-windows-amd64 copy [email protected] /path/to/{album}/{date_created:%Y/%Y-%m}`

10 changes: 5 additions & 5 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ iOS 16 feature to share libraries between accounts is [not supported](https://gi

Here are the steps to make it working:
- download binary from Github [Releases](https://github.com/icloud-photos-downloader/icloud_photos_downloader/releases) into desired local folder
- add executable flag by running `chmod +x icloudpd-1.15.0-macos-amd64`
- start it from the terminal: `icloudpd-1.15.0-macos-amd64`
- add executable flag by running `chmod +x icloudpd-1.15.1-macos-amd64`
- start it from the terminal: `icloudpd-1.15.1-macos-amd64`
- Apple will tell you that it cannot check for malicous software and refuse to run the app; click "Ok"
- Open "System Settings"/"Privacy & Security" and find `icloudpd-1.15.0-macos-amd64` as blocked app; Click "Allow"
- Start `icloudpd-1.15.0-macos-amd64` from the terminal again
- Open "System Settings"/"Privacy & Security" and find `icloudpd-1.15.1-macos-amd64` as blocked app; Click "Allow"
- Start `icloudpd-1.15.1-macos-amd64` from the terminal again
- Apple will show another warning; click "Open"
- After that you can run `icloudpd-1.15.0-macos-amd64 icloudpd --help` or any other supported command/option
- After that you can run `icloudpd-1.15.1-macos-amd64 icloudpd --help` or any other supported command/option
2 changes: 1 addition & 1 deletion binary_dist/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
version="1.15.0"
version="1.15.1"
name = "icloudpd"
description = "icloudpd is a command-line tool to download photos and videos from iCloud."
readme = "README_PYPI.md"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
version="1.15.0"
version="1.15.1"
name = "icloudpd"
description = "icloudpd is a command-line tool to download photos and videos from iCloud."
readme = "README_PYPI.md"
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_pypi
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ set -euo pipefail
# cleint use: pip install --index http://192.168.1.20:4880 --trusted-host 192.168.1.20 icloudpd

# linux
twine upload --repository-url $1 --non-interactive -u bogus -p bogus dist/icloudpd-1.15.0-py2.py3-none-manylinux*.whl dist/icloudpd-1.15.0-py2.py3-none-macos*.whl dist/icloudpd-1.15.0-py2.py3-none-win*.whl dist/icloudpd-1.15.0-py3-none-any.whl
twine upload --repository-url $1 --non-interactive -u bogus -p bogus dist/icloudpd-1.15.1-py2.py3-none-manylinux*.whl dist/icloudpd-1.15.1-py2.py3-none-macos*.whl dist/icloudpd-1.15.1-py2.py3-none-win*.whl dist/icloudpd-1.15.1-py3-none-any.whl
16 changes: 8 additions & 8 deletions src/icloudpd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
default=False,
)
# a hacky way to get proper version because automatic detection does not work for some reason
@click.version_option(version="1.15.0")
@click.version_option(version="1.15.1")
# pylint: disable-msg=too-many-arguments,too-many-statements
# pylint: disable-msg=too-many-branches,too-many-locals
def main(
Expand Down Expand Up @@ -462,15 +462,15 @@ def download_photo_(counter, photo) -> bool:
download_path = (f"-{photo_size}.").join(
download_path.rsplit(".", 1)
)
logger.info(
"%s deduplicated.",
logger.debug(
"%s deduplicated",
truncate_middle(download_path, 96)
)
file_exists = os.path.isfile(download_path)
if file_exists:
counter.increment()
logger.info(
"%s already exists.",
logger.debug(
"%s already exists",
truncate_middle(download_path, 96)
)

Expand Down Expand Up @@ -543,14 +543,14 @@ def download_photo_(counter, photo) -> bool:
lp_download_path.rsplit(".", 1)
)
logger.debug(
"%s deduplicated.",
"%s deduplicated",
truncate_middle(lp_download_path, 96)
)
lp_file_exists = os.path.isfile(
lp_download_path)
if lp_file_exists:
logger.info(
"%s already exists.",
logger.debug(
"%s already exists",
truncate_middle(lp_download_path, 96)
)
if not lp_file_exists:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_download_live_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ def test_skip_existing_live_photodownloads(self):
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))} already exists",
self._caplog.text,
)
self.assertIn(
f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514.HEIC'))}",
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))} already exists",
self._caplog.text,
)
self.assertIn(
Expand Down
24 changes: 12 additions & 12 deletions tests/test_download_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ def test_download_and_skip_existing_photos(self):
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists",
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists",
self._caplog.text,
)
self.assertIn(
Expand Down Expand Up @@ -346,11 +346,11 @@ def test_skip_existing_downloads(self):
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))} already exists",
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.MOV'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.MOV'))} already exists",
self._caplog.text,
)
self.assertIn(
Expand Down Expand Up @@ -454,15 +454,15 @@ def test_until_found(self):
)

for f in files_to_skip:
expected_message = f"INFO {os.path.join(base_dir, os.path.normpath(f[0]))} already exists."
expected_message = f"DEBUG {os.path.join(base_dir, os.path.normpath(f[0]))} already exists"
self.assertIn(expected_message, self._caplog.text)

self.assertIn(
"INFO Found 3 consecutive previously downloaded photos. Exiting",
self._caplog.text,
)
self.assertNotIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7399-medium.MOV'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7399-medium.MOV'))} already exists",
self._caplog.text
)

Expand Down Expand Up @@ -1242,27 +1242,27 @@ def mocked_download(self, size):
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))} deduplicated.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))} deduplicated",
self._caplog.text,
)
self.assertIn(
f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))}",
self._caplog.text,
)
self.assertIn(
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))} deduplicated.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))} deduplicated",
self._caplog.text,
)
self.assertIn(
f"DEBUG Downloading {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))}",
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists",
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.MOV'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.MOV'))} already exists",
self._caplog.text,
)
self.assertIn(
Expand Down Expand Up @@ -1630,11 +1630,11 @@ def test_download_over_old_original_photos(self):
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists",
self._caplog.text,
)
self.assertIn(
f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists.",
f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists",
self._caplog.text,
)
self.assertIn(
Expand Down

0 comments on commit 0525fcf

Please sign in to comment.