Skip to content

Commit a7f778c

Browse files
Release 1.8.0 (#547)
* bump dependencies and version 1.8.0 * remove dev docker from actions * add curl & git to docker until pyicloud_ipd moves from git ref to pypi * loosen dep versions * update doc * cross compile in docker * build python on linux only
1 parent 1f8d8b6 commit a7f778c

File tree

14 files changed

+78
-185
lines changed

14 files changed

+78
-185
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Python 3",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/python:0-3.9"
6+
"image": "mcr.microsoft.com/devcontainers/python:0-3.11"
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
// "features": {},

.github/workflows/create-release.yml

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ jobs:
3737
shell: bash
3838
strategy:
3939
matrix:
40-
os: [ubuntu-latest]
41-
python-version: [3.9]
42-
include:
43-
- os: macos-latest
44-
python-version: 3.9
45-
- os: windows-latest
46-
python-version: 3.9
40+
os: [ubuntu-latest, macos-latest, windows-latest]
41+
python-version: [3.11]
4742

4843
steps:
4944
- uses: actions/checkout@v3
@@ -61,31 +56,31 @@ jobs:
6156
run: |
6257
scripts/install_deps
6358
64-
- name: Build
59+
- name: Build Python (Linux)
6560
run: |
6661
scripts/build
62+
if: ${{ matrix.os == 'ubuntu-latest' }}
6763

6864
- name: Build Release Executables (Windows)
6965
run: |
7066
pyinstaller --onefile icloudpd.py --name icloudpd-${{needs.get_version.outputs.icloudpd_version}}-windows-amd64
7167
pyinstaller --onefile icloud.py --name icloud-${{needs.get_version.outputs.icloudpd_version}}-windows-amd64
72-
if: ${{ matrix.python-version == '3.9' && matrix.os == 'windows-latest' }}
68+
if: ${{ matrix.os == 'windows-latest' }}
7369

7470
- name: Build Release Executables (Linux)
7571
run: |
7672
pyinstaller --onefile icloudpd.py --name icloudpd-${{needs.get_version.outputs.icloudpd_version}}-linux-amd64
7773
pyinstaller --onefile icloud.py --name icloud-${{needs.get_version.outputs.icloudpd_version}}-linux-amd64
78-
if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' }}
74+
if: ${{ matrix.os == 'ubuntu-latest' }}
7975

8076
- name: Build Release Executables (MacOS)
8177
run: |
8278
pyinstaller --onefile icloudpd.py --name icloudpd-${{needs.get_version.outputs.icloudpd_version}}-macos-amd64
8379
pyinstaller --onefile icloud.py --name icloud-${{needs.get_version.outputs.icloudpd_version}}-macos-amd64
84-
if: ${{ matrix.python-version == '3.9' && matrix.os == 'macos-latest' }}
80+
if: ${{ matrix.os == 'macos-latest' }}
8581

8682
- name: Upload artifacts
8783
uses: actions/upload-artifact@v3
88-
if: ${{ matrix.python-version == '3.9' }}
8984
with:
9085
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
9186
if-no-files-found: error
@@ -94,18 +89,11 @@ jobs:
9489
9590
build_publish_docker:
9691
runs-on: ubuntu-latest
97-
needs: [get_version, build]
92+
needs: [get_version]
9893

9994
steps:
10095
- uses: actions/checkout@v3
10196

102-
- name: Download artifacts
103-
uses: actions/download-artifact@v3
104-
with:
105-
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
106-
path: |
107-
dist
108-
10997
- name: Set up QEMU
11098
uses: docker/setup-qemu-action@v2
11199

@@ -125,31 +113,27 @@ jobs:
125113
password: ${{ secrets.DOCKERHUB_PASSWORD }}
126114

127115
- name: Build Release Docker & Publish
128-
env:
129-
ICLOUDPD_VERSION: ${{needs.get_version.outputs.icloudpd_version}}
130116
uses: docker/build-push-action@v3
131117
with:
132118
context: .
133-
file: ./Dockerfile.release
119+
file: ./Dockerfile
134120
platforms: linux/amd64,linux/arm64,linux/386
135121
push: true
136122
tags: |
137123
icloudpd/icloudpd:latest
138124
icloudpd/icloudpd:${{needs.get_version.outputs.icloudpd_version}}
139-
build-args: |
140-
ICLOUDPD_VERSION=${{needs.get_version.outputs.icloudpd_version}}
141125
142-
publish_twine:
126+
publish_pypi:
143127
runs-on: ubuntu-latest
144128
needs: [get_version,build]
145129
steps:
146130
- name: Checkout code
147131
uses: actions/checkout@v3
148132

149-
- name: Set up Python 3.9
133+
- name: Set up Python 3.11
150134
uses: actions/setup-python@v4
151135
with:
152-
python-version: 3.9
136+
python-version: 3.11
153137

154138
- name: Install dependencies
155139
run: |
@@ -168,8 +152,6 @@ jobs:
168152
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
169153
run: |
170154
python3 -m twine upload dist/*.whl
171-
#python3 -m twine upload --repository testpypi dist/*
172-
# todo: put repo in github secret for flexibility
173155
174156
release:
175157
needs: [get_version, build]
@@ -191,27 +173,3 @@ jobs:
191173
artifacts: "dist/*"
192174
body: ${{ needs.get_version.outputs.icloudpd_changelog }}
193175

194-
# - name: Create Release
195-
# if: endsWith(github.ref, needs.get_version.outputs.icloudpd_version)
196-
# id: create_release
197-
# uses: actions/create-release@v1
198-
# env:
199-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
200-
# with:
201-
# tag_name: ${{ github.ref }}
202-
# release_name: Release ${{ github.ref }}
203-
# body: ${{ needs.get_version.outputs.icloudpd_changelog }}
204-
# draft: false
205-
# prerelease: false
206-
207-
# - name: Upload Release Assets
208-
# if: endsWith(github.ref, needs.get_version.outputs.icloudpd_version)
209-
# id: upload-release-asset
210-
# uses: actions/upload-release-asset@v1
211-
# env:
212-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
213-
# with:
214-
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
215-
# asset_path: ${{env.ICLOUDPD_ASSET_PATH}}
216-
# asset_name: ${{env.ICLOUDPD_ASSET_NAME}}
217-
# asset_content_type: application/zip

.github/workflows/quality-checks.yml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest]
21-
python-version: [3.7, 3.8, 3.9]
21+
python-version: [3.7, 3.8, 3.9, '3.10', 3.11]
2222
steps:
2323
- uses: actions/checkout@v3
2424
- name: Set up Python ${{ matrix.python-version }}
@@ -67,13 +67,8 @@ jobs:
6767
shell: bash
6868
strategy:
6969
matrix:
70-
os: [ubuntu-latest]
71-
python-version: [3.7, 3.8, 3.9]
72-
include:
73-
- os: macos-latest
74-
python-version: 3.9
75-
- os: windows-latest
76-
python-version: 3.9
70+
os: [ubuntu-latest, macos-latest, windows-latest]
71+
python-version: [3.11]
7772

7873
steps:
7974
- uses: actions/checkout@v3
@@ -87,31 +82,31 @@ jobs:
8782
run: |
8883
scripts/install_deps
8984
90-
- name: Build
85+
- name: Build Python (Linux)
9186
run: |
9287
scripts/build
88+
if: ${{ matrix.os == 'ubuntu-latest' }}
9389

9490
- name: Build Release Executables (Windows)
9591
run: |
9692
pyinstaller --onefile icloudpd.py --name icloudpd-${{needs.get_version.outputs.icloudpd_version}}-windows-amd64
9793
pyinstaller --onefile icloud.py --name icloud-${{needs.get_version.outputs.icloudpd_version}}-windows-amd64
98-
if: ${{ matrix.python-version == '3.9' && matrix.os == 'windows-latest' }}
94+
if: ${{ matrix.os == 'windows-latest' }}
9995

10096
- name: Build Release Executables (Linux)
10197
run: |
10298
pyinstaller --onefile icloudpd.py --name icloudpd-${{needs.get_version.outputs.icloudpd_version}}-linux-amd64
10399
pyinstaller --onefile icloud.py --name icloud-${{needs.get_version.outputs.icloudpd_version}}-linux-amd64
104-
if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' }}
100+
if: ${{ matrix.os == 'ubuntu-latest' }}
105101

106102
- name: Build Release Executables (MacOS)
107103
run: |
108104
pyinstaller --onefile icloudpd.py --name icloudpd-${{needs.get_version.outputs.icloudpd_version}}-macos-amd64
109105
pyinstaller --onefile icloud.py --name icloud-${{needs.get_version.outputs.icloudpd_version}}-macos-amd64
110-
if: ${{ matrix.python-version == '3.9' && matrix.os == 'macos-latest' }}
106+
if: ${{ matrix.os == 'macos-latest' }}
111107

112108
- name: Upload artifacts
113109
uses: actions/upload-artifact@v3
114-
if: ${{ matrix.python-version == '3.9' }}
115110
with:
116111
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
117112
if-no-files-found: error
@@ -120,18 +115,11 @@ jobs:
120115
121116
build_docker:
122117
runs-on: ubuntu-latest
123-
needs: [get_version, build]
118+
needs: [get_version]
124119

125120
steps:
126121
- uses: actions/checkout@v3
127122

128-
- name: Download artifacts
129-
uses: actions/download-artifact@v3
130-
with:
131-
name: icloudpd-${{needs.get_version.outputs.icloudpd_version}}-artifacts
132-
path: |
133-
dist
134-
135123
- name: Set up QEMU
136124
uses: docker/setup-qemu-action@v2
137125

@@ -145,36 +133,12 @@ jobs:
145133
run: echo ${{ steps.buildx.outputs.platforms }}
146134

147135
- name: Build Release Docker
148-
env:
149-
ICLOUDPD_VERSION: ${{needs.get_version.outputs.icloudpd_version}}
150136
uses: docker/build-push-action@v3
151137
with:
152138
context: .
153-
file: ./Dockerfile.release
139+
file: ./Dockerfile
154140
platforms: linux/amd64,linux/arm64,linux/386
155141
push: false
156142
tags: |
157143
icloudpd/icloudpd:latest
158144
icloudpd/icloudpd:${{needs.get_version.outputs.icloudpd_version}}
159-
build-args: |
160-
ICLOUDPD_VERSION=${{needs.get_version.outputs.icloudpd_version}}
161-
162-
163-
build_dev_docker:
164-
runs-on: ubuntu-latest
165-
steps:
166-
- uses: actions/checkout@v3
167-
168-
- name: Set up QEMU
169-
uses: docker/setup-qemu-action@v2
170-
171-
- name: Set up Docker Buildx
172-
uses: docker/setup-buildx-action@v2
173-
174-
- name: Build Dev Docker
175-
uses: docker/build-push-action@v3
176-
with:
177-
context: .
178-
file: ./Dockerfile
179-
platforms: linux/amd64,linux/arm64
180-
push: false

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
## 1.8.0 (2023-01-27)
6+
7+
- update dependencies to solve [#539](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/539)
58
- feature: a new command line option `--delete-after-download` to allow user to delete photos in the iCloud right after download is complete. [#431](https://github.com/icloud-photos-downloader/icloud_photos_downloader/pull/431), [#368](https://github.com/icloud-photos-downloader/icloud_photos_downloader/pull/368) [#314](https://github.com/icloud-photos-downloader/icloud_photos_downloader/pull/314) [#124](https://github.com/icloud-photos-downloader/icloud_photos_downloader/pull/124) [#332](https://github.com/icloud-photos-downloader/icloud_photos_downloader/pull/332)
69

710
## 1.7.3 (2023-01-20)

Dockerfile

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,27 @@
1-
# This image is mainly used for development and testing
2-
3-
FROM python:3.9 as base
1+
FROM python:3.11-alpine3.17 as build
42

53
WORKDIR /app
6-
# explicit requirements because runtime does not need ALL dependencies
7-
COPY requirements-pip.txt .
8-
COPY requirements.txt .
9-
RUN pip3 install -r requirements-pip.txt
10-
RUN pip3 install -r requirements.txt
11-
12-
FROM base as common
13-
RUN apt-get update && apt-get install -y dos2unix
14-
RUN mkdir Photos
15-
COPY requirements*.txt ./
16-
COPY scripts/install_deps scripts/install_deps
17-
RUN dos2unix scripts/install_deps
18-
RUN scripts/install_deps
19-
COPY . .
20-
RUN dos2unix scripts/*
4+
215
ENV TZ="America/Los_Angeles"
226

23-
FROM common as test
7+
RUN set -xe \
8+
&& apk update \
9+
&& apk add git curl binutils gcc libc-dev libffi-dev cargo zlib-dev openssl-dev
2410

25-
RUN scripts/test
26-
RUN scripts/lint
11+
COPY . .
12+
13+
RUN pip3 install -r requirements-pip.txt -r requirements.txt -r requirements-dev.txt
2714

28-
FROM common as build
15+
RUN pyinstaller -y icloudpd.py
16+
RUN pyinstaller -y icloud.py
17+
RUN cp dist/icloud/icloud dist/icloudpd/
2918

30-
RUN scripts/build
19+
FROM alpine:3.17 as runtime
3120

32-
FROM python:3.9-alpine as runtime
21+
WORKDIR /app
3322

34-
COPY --from=build /app/dist/* /tmp
35-
RUN pip3 install /tmp/*.whl
23+
COPY --from=build /app/dist/icloudpd .
3624

37-
# copy from test to ensure test stage runs before runtime stage in buildx
38-
COPY --from=test /app/.coverage .
25+
RUN set -xe \
26+
&& ln -s /app/icloudpd /usr/local/bin/icloudpd \
27+
&& ln -s /app/icloud /usr/local/bin/icloud

Dockerfile.release

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This tool is developed and maintained by volunteers (we are always looking for [
1111
There are three ways to run `icloudpd`:
1212
1. Download executable for your platform from the Github Release and run it
1313
1. Use Docker to download and run the tool (requires Docker installed, e.g. [Docker Desktop](https://www.docker.com/products/docker-desktop/)
14-
1. Install the tool using `pip` from Python (requires Python and `pip` installed)
14+
1. Run from the source (requires Python and `pip` installed)
1515

1616
### Download with Docker
1717

@@ -21,7 +21,7 @@ Docker automatically pulls images from the remote repository if necessary. To do
2121
docker pull icloudpd/icloudpd
2222
```
2323

24-
### Install using `pip`
24+
### Running from the source
2525

2626
`icloudpd` is a Python package that can be installed using `pip`:
2727

@@ -234,11 +234,11 @@ docker run -it --rm icloudpd:latest icloudpd --version
234234

235235
### Install Python & pip
236236

237-
Note that `icloudpd` works with python 3.9 and breaks on later versions of Python now.
237+
Note that `icloudpd` works with python 3.7+.
238238

239239
#### Windows
240240

241-
- [Download Python 3.9](https://www.python.org/downloads/windows/)
241+
- [Download Python](https://www.python.org/downloads/windows/)
242242

243243
#### Mac
244244

0 commit comments

Comments
 (0)