simple-c2pa

This is a fork of https://gitlab.com/guardianproject/proofmode/simple-c2pa
git clone git://archive.git.mtrnord.blog/mtrnords-photography-manager/simple-c2pa.git
Log | Files | Refs | README | LICENSE

commit e58e386b5379c0129eae98fd862aaacc1cd5a3de
parent 8b1393a2325b0c9d8f5d1ca45aa636aed5ebb4f8
Author: Darren Clarke <darren@redaranj.com>
Date:   Thu,  9 Nov 2023 11:58:51 +0100

Add Apple outputs to packages

Diffstat:
Mmobile/android/.gitlab-ci.yml | 2+-
Mmobile/apple/.gitlab-ci.yml | 20+++++++++++---------
Mmobile/apple/build.sh | 4++--
3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/mobile/android/.gitlab-ci.yml b/mobile/android/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: .macos_runners: tags: - - proofmode-macos + - xxx-proofmode-macos before_script: - echo "started by ${GITLAB_USER_NAME}" diff --git a/mobile/apple/.gitlab-ci.yml b/mobile/apple/.gitlab-ci.yml @@ -1,16 +1,11 @@ stages: - build + - upload - release -.macos_runners: +build_apple: tags: - proofmode-macos - before_script: - - echo "started by ${GITLAB_USER_NAME}" - -build_apple: - extends: - - .macos_runners stage: build script: - ./mobile/apple/build.sh @@ -18,6 +13,13 @@ build_apple: paths: - ./mobile/apple/out/ +upload_apple: + stage: upload + image: curlimages/curl:latest + script: + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./mobile/apple/out/simple_c2pa_mobile.swift "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/simple_c2pa_mobile/v0.${CI_PIPELINE_IID}/simple_c2pa_mobile.swift"' + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./mobile/apple/out/simple_c2pa_mobile.xcframework.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/simple_c2pa_mobile/v0.${CI_PIPELINE_IID}/simple_c2pa_mobile.xcframework.zip"' + release_apple: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest @@ -34,6 +36,6 @@ release_apple: assets: links: - name: "simple_c2pa_mobile.swift" - url: "https://gitlab.com/guardianproject/proofmode/simple-c2pa/-/jobs/$JOB_ID/artifacts/download" + url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/simple_c2pa_mobile/v0.${CI_PIPELINE_IID}/simple_c2pa_mobile.swift" - name: "simple_c2pa_mobile.xcframework.zip" - url: "https://gitlab.com/guardianproject/proofmode/simple-c2pa/-/jobs/$JOB_ID/artifacts/download" + url: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/simple_c2pa_mobile/v0.${CI_PIPELINE_IID}/simple_c2pa_mobile.xcframework.zip" diff --git a/mobile/apple/build.sh b/mobile/apple/build.sh @@ -39,7 +39,7 @@ xcodebuild -create-xcframework \ -library "${TARGET_DIR}/simulators.a" \ -headers "${NEW_HEADER_DIR}" \ -output "${OUT_DIR}/${NAME}.xcframework" - -zip -r "${OUT_DIR}/${NAME}.xcframework.zip" "${OUT_DIR}/${NAME}.xcframework" + +(cd "${OUT_DIR}" && zip -r "${NAME}.xcframework.zip" "${NAME}.xcframework") rm -rf "${OUT_DIR}/${NAME}.xcframework" cp "${BINDINGS_DIR}/${NAME}.swift" "${OUT_DIR}/"