4 if [ -z "${PASS_DESKTOP_METADATA_REPO}" ]; then
5 echo "PASS_DESKTOP_METADATA_REPO is not set."
9 PLATFORM
="$PASS_RELEASE_PLATFORM"
10 CHANNEL
="$PASS_RELEASE_CHANNEL"
11 VERSION
=$
(grep '"version":' -m 1 applications
/pass-desktop
/package.json |
sed 's/.*"version": "\(.*\)".*/\1/')
13 GIT_COMMIT_AUTHOR
="${GITLAB_USER_NAME}"
14 GIT_COMMIT_EMAIL
="${GITLAB_USER_EMAIL}"
15 METADATA_REPO
=$
(mktemp
-d)
16 BRANCH_NAME
="release/${PLATFORM}-${VERSION}-${CHANNEL}"
18 # Clone existing metadata
19 git clone
--depth 1 "${PASS_DESKTOP_METADATA_REPO}" "$METADATA_REPO"
23 git config
--local user.name
"${GIT_COMMIT_AUTHOR}"
24 git config
--local user.email
"${GIT_COMMIT_EMAIL}"
27 python3
"${CWD}/applications/pass-desktop/tools/update-metadata.py" "$PLATFORM" "$CHANNEL"
30 if [ "$PLATFORM" = "windows" ]; then
31 cp "$CWD/applications/pass-desktop/out/make/squirrel.windows/x64/RELEASES" "assets/windows/RELEASES"
32 elif [ "$PLATFORM" = "macos" ]; then
33 cp "$CWD/applications/pass-desktop/out/make/zip/darwin/universal/RELEASES.json" "assets/macos/RELEASES.json"
37 git checkout
-b "$BRANCH_NAME"
40 git commit
-m "Pass Desktop ${VERSION} (${PLATFORM}, ${CHANNEL})"
41 git push
-u origin
"$BRANCH_NAME" -o merge_request.create
-o merge_request.target
=main
-o merge_request.remove_source_branch