mirror of
https://gitlab.com/psono/psono-client
synced 2025-04-19 03:22:16 +03:00
Added electron app
Signed-off-by: Sascha Pfeiffer <sascha.pfeiffer@esaqa.com>
This commit is contained in:
parent
7562fd2015
commit
3b6dd519ce
29
.gitignore
vendored
29
.gitignore
vendored
@ -1,13 +1,16 @@
|
||||
.idea
|
||||
.vscode
|
||||
docs
|
||||
out
|
||||
unittests/coverage
|
||||
var/ngdocs/templates
|
||||
node_modules
|
||||
build/
|
||||
dist/
|
||||
doc/
|
||||
test
|
||||
*~
|
||||
*.py[cod]
|
||||
.idea
|
||||
.vscode
|
||||
docs
|
||||
out
|
||||
unittests/coverage
|
||||
var/ngdocs/templates
|
||||
node_modules
|
||||
build/
|
||||
dist/
|
||||
doc/
|
||||
src/electron/out/
|
||||
src/electron/src/*
|
||||
!src/electron/src/.gitkeep
|
||||
test
|
||||
*~
|
||||
*.py[cod]
|
||||
|
741
.gitlab-ci.yml
741
.gitlab-ci.yml
@ -23,298 +23,475 @@ test-unittests:
|
||||
## - apt-get install -y google-chrome-stable
|
||||
# - karma start ./unittests/karma-chromium-headless.conf.js
|
||||
|
||||
test-linter:
|
||||
#test-linter:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: test
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildfirefox
|
||||
# - npm install -g addons-linter@1.17.0
|
||||
# - cat ./build/firefox/manifest.json
|
||||
# - addons-linter --help
|
||||
# - addons-linter ./build/firefox
|
||||
#
|
||||
#test-vulnerability-scan:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: test
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - apt-get update
|
||||
# - apt-get install -y curl
|
||||
# - curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||
# - apt-get install -y nodejs
|
||||
# - node --version
|
||||
# - npm --version
|
||||
# - npm audit --audit-level high --json --only=prod
|
||||
# allow_failure: true
|
||||
#
|
||||
#
|
||||
#test-upload-translations:
|
||||
# stage: test
|
||||
# image: psono-docker.jfrog.io/python:3
|
||||
# script:
|
||||
# - pip install requests
|
||||
# - python3 var/sync_translations.py
|
||||
# only:
|
||||
# - develop
|
||||
#
|
||||
#build-docker-image:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: build
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# services:
|
||||
# - name: docker:20-dind
|
||||
# alias: docker
|
||||
# command: ["--tls=false"]
|
||||
# variables:
|
||||
# DOCKER_DRIVER: overlay2
|
||||
# DOCKER_HOST: tcp://docker:2375/
|
||||
# DOCKER_TLS_CERTDIR: ""
|
||||
# script:
|
||||
# - apt-get update && apt-get install -y curl
|
||||
# - sh ./var/download_translations_from_artifactory.sh
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildwebclient
|
||||
# - curl -fSL "https://psono.jfrog.io/artifactory/generic-local/docker/docker-20.10.17.tgz" -o docker.tgz && echo "969210917b5548621a2b541caf00f86cc6963c6cf0fb13265b9731c3b98974d9 *docker.tgz" | sha256sum -c - && tar -xzvf docker.tgz && mv docker/* /usr/local/bin/ && rm -Rf docker && rm docker.tgz
|
||||
# - docker info
|
||||
# - echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
|
||||
# - docker build -t $CONTAINER_TEST_IMAGE --pull .
|
||||
# - docker push $CONTAINER_TEST_IMAGE
|
||||
# - curl -fL https://getcli.jfrog.io | sh
|
||||
# - ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
# - ./jfrog rt sp "docker/psono/psono-client/$CI_COMMIT_REF_NAME/manifest.json" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION"
|
||||
# - ./jfrog rt sp "docker/psono/psono-client/$CI_COMMIT_REF_NAME/manifest.json" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
#
|
||||
#
|
||||
#
|
||||
#build-firefox-extension:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: build
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - apt-get update && apt-get install -y curl
|
||||
# - sh ./var/download_translations_from_artifactory.sh
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildfirefox
|
||||
# - sh ./var/package-firefox-extension.sh
|
||||
# - curl -fL https://getcli.jfrog.io | sh
|
||||
# - ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
# - ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" /builds/psono/psono-client/dist/firefox/psono.firefox.PW.zip psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip
|
||||
# - ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
# - mv /builds/psono/psono-client/build/firefox ../
|
||||
# - rm -Rf *
|
||||
# - rm -Rf .* 2> /dev/null || true
|
||||
# - mv ../firefox/* ./
|
||||
# artifacts:
|
||||
# name: "firefox_$CI_COMMIT_REF_NAME"
|
||||
# paths:
|
||||
# - ./*
|
||||
#
|
||||
#
|
||||
#build-chrome-extension:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: build
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - apt-get update && apt-get install -y curl
|
||||
# - sh ./var/download_translations_from_artifactory.sh
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildchrome
|
||||
# - sh ./var/package-chrome-extension.sh
|
||||
# - curl -fL https://getcli.jfrog.io | sh
|
||||
# - ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
# - ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" /builds/psono/psono-client/dist/chrome/psono.chrome.PW.zip psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip
|
||||
# - ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
# - mv /builds/psono/psono-client/build/chrome ../
|
||||
# - rm -Rf *
|
||||
# - rm -Rf .* 2> /dev/null || true
|
||||
# - mv ../chrome/* ./
|
||||
# artifacts:
|
||||
# name: "chrome_$CI_COMMIT_REF_NAME"
|
||||
# paths:
|
||||
# - ./*
|
||||
|
||||
build-electron-linux:
|
||||
except:
|
||||
- schedules
|
||||
stage: test
|
||||
stage: build
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- apt-get update && apt-get install -y curl
|
||||
- sh ./var/download_translations_from_artifactory.sh
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildfirefox
|
||||
- npm install -g addons-linter@1.17.0
|
||||
- cat ./build/firefox/manifest.json
|
||||
- addons-linter --help
|
||||
- addons-linter ./build/firefox
|
||||
- apt-get install -y rpm
|
||||
- npm run buildelectron
|
||||
- mkdir -p src/electron/src
|
||||
- cp -R build/electron/* src/electron/src
|
||||
- cd src/electron/
|
||||
- npm ci
|
||||
- npm run make
|
||||
- cd ../..
|
||||
- mv ./src/electron/out/make ../
|
||||
- rm -Rf *
|
||||
- rm -Rf .* 2> /dev/null || true
|
||||
- mv ../make/* ./
|
||||
artifacts:
|
||||
name: "electron_linux_$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ./*
|
||||
expire_in: 1 week
|
||||
|
||||
test-vulnerability-scan:
|
||||
build-electron-macos:
|
||||
except:
|
||||
- schedules
|
||||
stage: test
|
||||
stage: build
|
||||
script:
|
||||
- sh ./var/download_translations_from_artifactory.sh
|
||||
- npm ci
|
||||
- npm run buildelectron
|
||||
- mkdir -p src/electron/src
|
||||
- cp -R build/electron/* src/electron/src
|
||||
- cd src/electron/
|
||||
- npm ci
|
||||
- npm run make
|
||||
- cd ../..
|
||||
- mv ./src/electron/out/make ../
|
||||
- rm -Rf *
|
||||
- rm -Rf .* 2> /dev/null || true
|
||||
- mv ../make/* ./
|
||||
artifacts:
|
||||
name: "electron_macos_$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ./*
|
||||
expire_in: 1 week
|
||||
tags:
|
||||
- macos
|
||||
|
||||
build-electron-windows:
|
||||
except:
|
||||
- schedules
|
||||
stage: build
|
||||
script:
|
||||
- .\var\download_translations_from_artifactory.ps1
|
||||
- npm ci
|
||||
- npm run buildelectron
|
||||
- mkdir -p src/electron/src
|
||||
- cp -R build/electron/* src/electron/src
|
||||
- cd src/electron/
|
||||
- npm ci
|
||||
- npm i exe-icon-extractor@1.0.8
|
||||
- npm run make
|
||||
- cd ../..
|
||||
- mv ./src/electron/out/make ../
|
||||
- rm -r -force ./*
|
||||
- mv ../make/* ./
|
||||
- rm -r -force ../make
|
||||
artifacts:
|
||||
name: "electron_windows_$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ./*
|
||||
expire_in: 1 week
|
||||
tags:
|
||||
- windows
|
||||
|
||||
upload-electron-gcp:
|
||||
except:
|
||||
- schedules
|
||||
stage: deploy
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
dependencies:
|
||||
- build-electron-linux
|
||||
- build-electron-macos
|
||||
- build-electron-windows
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y curl
|
||||
- curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||
- apt-get install -y nodejs
|
||||
- node --version
|
||||
- npm --version
|
||||
- npm audit --audit-level high --json --only=prod
|
||||
allow_failure: true
|
||||
|
||||
|
||||
test-upload-translations:
|
||||
stage: test
|
||||
image: psono-docker.jfrog.io/python:3
|
||||
script:
|
||||
- pip install requests
|
||||
- python3 var/sync_translations.py
|
||||
- apt-get update && apt-get install -y curl
|
||||
- mkdir upload
|
||||
- ls
|
||||
- mv rpm/x64/*.x86_64.rpm ./upload/psono.x86_64.rpm
|
||||
- mv deb/x64/*amd64.deb ./upload/psono.amd64.deb
|
||||
- mv squirrel.windows/x64/*.exe ./upload/psono.x86_64.exe
|
||||
- mv Psono.dmg ./upload/psono.dmg
|
||||
- ls ./upload/
|
||||
- curl -fL https://getcli.jfrog.io | sh
|
||||
- ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" ./upload/psono.x86_64.rpm psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.rpm
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.rpm" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" ./upload/psono.amd64.deb psono/client/$CI_COMMIT_REF_NAME/psono.amd64.deb
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/psono.amd64.deb" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" ./upload/psono.x86_64.exe psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.exe
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.exe" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" ./upload/psono.dmg psono/client/$CI_COMMIT_REF_NAME/psono.dmg
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/psono.dmg" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
only:
|
||||
- develop
|
||||
|
||||
|
||||
build-docker-image:
|
||||
except:
|
||||
- schedules
|
||||
stage: build
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
services:
|
||||
- name: docker:20-dind
|
||||
alias: docker
|
||||
command: ["--tls=false"]
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- sh ./var/download_translations_from_artifactory.sh
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildwebclient
|
||||
- curl -fSL "https://psono.jfrog.io/artifactory/generic-local/docker/docker-20.10.17.tgz" -o docker.tgz && echo "969210917b5548621a2b541caf00f86cc6963c6cf0fb13265b9731c3b98974d9 *docker.tgz" | sha256sum -c - && tar -xzvf docker.tgz && mv docker/* /usr/local/bin/ && rm -Rf docker && rm docker.tgz
|
||||
- docker info
|
||||
- echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
|
||||
- docker build -t $CONTAINER_TEST_IMAGE --pull .
|
||||
- docker push $CONTAINER_TEST_IMAGE
|
||||
- curl -fL https://getcli.jfrog.io | sh
|
||||
- ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
- ./jfrog rt sp "docker/psono/psono-client/$CI_COMMIT_REF_NAME/manifest.json" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION"
|
||||
- ./jfrog rt sp "docker/psono/psono-client/$CI_COMMIT_REF_NAME/manifest.json" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
|
||||
|
||||
|
||||
build-firefox-extension:
|
||||
except:
|
||||
- schedules
|
||||
stage: build
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/download_translations_from_artifactory.sh
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildfirefox
|
||||
- sh ./var/package-firefox-extension.sh
|
||||
- curl -fL https://getcli.jfrog.io | sh
|
||||
- ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" /builds/psono/psono-client/dist/firefox/psono.firefox.PW.zip psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
- mv /builds/psono/psono-client/build/firefox ../
|
||||
- rm -Rf *
|
||||
- rm -Rf .* 2> /dev/null || true
|
||||
- mv ../firefox/* ./
|
||||
artifacts:
|
||||
name: "firefox_$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ./*
|
||||
|
||||
|
||||
build-chrome-extension:
|
||||
except:
|
||||
- schedules
|
||||
stage: build
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/download_translations_from_artifactory.sh
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildchrome
|
||||
- sh ./var/package-chrome-extension.sh
|
||||
- curl -fL https://getcli.jfrog.io | sh
|
||||
- ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" /builds/psono/psono-client/dist/chrome/psono.chrome.PW.zip psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
- mv /builds/psono/psono-client/build/chrome ../
|
||||
- rm -Rf *
|
||||
- rm -Rf .* 2> /dev/null || true
|
||||
- mv ../chrome/* ./
|
||||
artifacts:
|
||||
name: "chrome_$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ./*
|
||||
|
||||
|
||||
build-webclient:
|
||||
except:
|
||||
- schedules
|
||||
stage: build
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/download_translations_from_artifactory.sh
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildwebclient
|
||||
- sh ./var/package-webclient.sh
|
||||
- curl -fL https://getcli.jfrog.io | sh
|
||||
- ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
- ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" /builds/psono/psono-client/dist/webclient/psono.webclient.PW.zip psono/client/$CI_COMMIT_REF_NAME/webclient.zip
|
||||
- ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/webclient.zip" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
- mv /builds/psono/psono-client/build/webclient ../
|
||||
- rm -Rf *
|
||||
- rm -Rf .* 2> /dev/null || true
|
||||
- mv ../webclient/* ./
|
||||
artifacts:
|
||||
name: "webclient_$CI_COMMIT_REF_NAME"
|
||||
paths:
|
||||
- ./*
|
||||
|
||||
release-artifacts:
|
||||
except:
|
||||
- schedules
|
||||
stage: release
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y curl
|
||||
- curl -fL https://getcli.jfrog.io | sh
|
||||
- ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
- ./jfrog rt cp --flat psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip psono/client/latest/
|
||||
- ./jfrog rt cp --flat psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip psono/client/latest/
|
||||
- ./jfrog rt cp --flat psono/client/$CI_COMMIT_REF_NAME/webclient.zip psono/client/latest/
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
|
||||
release-docker:
|
||||
except:
|
||||
- schedules
|
||||
stage: release
|
||||
image: psono-docker.jfrog.io/docker:20.10.17-git
|
||||
services:
|
||||
- name: docker:20-dind
|
||||
alias: docker
|
||||
command: ["--tls=false"]
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- docker info
|
||||
- echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
|
||||
- docker pull $CONTAINER_TEST_IMAGE
|
||||
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
|
||||
- docker push $CONTAINER_RELEASE_IMAGE
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
deploy-docker:
|
||||
except:
|
||||
- schedules
|
||||
stage: deploy
|
||||
image: psono-docker.jfrog.io/docker:20.10.17-git
|
||||
services:
|
||||
- name: docker:20-dind
|
||||
alias: docker
|
||||
command: ["--tls=false"]
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
|
||||
- echo $docker_hub_credentials | docker login --username=psonogitlab --password-stdin
|
||||
- sh ./var/deploy-docker.sh
|
||||
environment:
|
||||
name: production
|
||||
url: https://psono.pw
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
|
||||
deploy-github:
|
||||
except:
|
||||
- schedules
|
||||
stage: deploy
|
||||
image: psono-docker.jfrog.io/docker:20.10.17-git
|
||||
services:
|
||||
- name: docker:20-dind
|
||||
alias: docker
|
||||
command: ["--tls=false"]
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- sh ./var/deploy-github.sh
|
||||
environment:
|
||||
name: github
|
||||
url: https://github.com/psono/psono-client
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
|
||||
deploy-chrome:
|
||||
except:
|
||||
- schedules
|
||||
stage: deploy
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildchrome
|
||||
- sh ./var/deploy-chrome-extension.sh
|
||||
environment:
|
||||
name: chrome-webstore
|
||||
url: https://chrome.google.com/webstore/detail/psonopw/eljmjmgjkbmpmfljlmklcfineebidmlo
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
|
||||
deploy-firefox:
|
||||
except:
|
||||
- schedules
|
||||
stage: deploy
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/prep-build.sh
|
||||
- npm run buildfirefox
|
||||
- sh ./var/deploy-firefox-extension.sh
|
||||
environment:
|
||||
name: firefox-webstore
|
||||
url: https://addons.mozilla.org/de/firefox/addon/psono-pw-password-manager/
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
deploy-changelog:
|
||||
except:
|
||||
- schedules
|
||||
stage: deploy
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/deploy_changelog.sh
|
||||
environment:
|
||||
name: static.psono.com
|
||||
url: https://static.psono.com/gitlab.com/psono/psono-client/changelog.json
|
||||
only:
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
||||
|
||||
deploy-nightlyartifacts:
|
||||
except:
|
||||
- schedules
|
||||
stage: release
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/deploy_nightlyartifacts.sh
|
||||
environment:
|
||||
name: static.psono.com
|
||||
url: https://get.psono.com/psono/psono-client/nightly/chrome-extension.zip
|
||||
only:
|
||||
- develop
|
||||
|
||||
|
||||
deploy-releaseartifacts:
|
||||
except:
|
||||
- schedules
|
||||
stage: release
|
||||
image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
script:
|
||||
- sh ./var/deploy_releaseartifacts.sh
|
||||
environment:
|
||||
name: static.psono.com
|
||||
url: https://get.psono.com/psono/psono-client/latest/chrome-extension.zip
|
||||
only:
|
||||
- master
|
||||
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#deploy-electron-linux:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - apt-get update && apt-get install -y curl
|
||||
# - sh ./var/download_translations_from_artifactory.sh
|
||||
# - sh ./var/prep-build.sh
|
||||
# - apt-get install -y rpm
|
||||
# - npm run buildelectron
|
||||
# - mkdir -p src/electron/src
|
||||
# - cp -R build/electron/* src/electron/src
|
||||
# - cd src/electron/
|
||||
# - npm ci
|
||||
# - npm run publish
|
||||
# - cd ../..
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#deploy-electron-macos:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# script:
|
||||
# - sh ./var/download_translations_from_artifactory.sh
|
||||
# - npm ci
|
||||
# - npm run buildelectron
|
||||
# - mkdir -p src/electron/src
|
||||
# - cp -R build/electron/* src/electron/src
|
||||
# - cd src/electron/
|
||||
# - npm ci
|
||||
# - npm run publish
|
||||
# - cd ../..
|
||||
# tags:
|
||||
# - macos
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#deploy-electron-windows:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# script:
|
||||
# - .\var\download_translations_from_artifactory.ps1
|
||||
# - npm ci
|
||||
# - npm run buildelectron
|
||||
# - mkdir -p src/electron/src
|
||||
# - cp -R build/electron/* src/electron/src
|
||||
# - cd src/electron/
|
||||
# - npm ci
|
||||
# - npm i exe-icon-extractor@1.0.8
|
||||
# - npm run publish
|
||||
# - cd ../..
|
||||
# allow_failure: true
|
||||
# tags:
|
||||
# - windows
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#build-webclient:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: build
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - apt-get update && apt-get install -y curl
|
||||
# - sh ./var/download_translations_from_artifactory.sh
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildwebclient
|
||||
# - sh ./var/package-webclient.sh
|
||||
# - curl -fL https://getcli.jfrog.io | sh
|
||||
# - ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
# - ./jfrog rt u --props="CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_COMMIT_SHA=$CI_COMMIT_SHA;CI_COMMIT_URL=$CI_PROJECT_URL/commit/$CI_COMMIT_SHA;CI_PROJECT_ID=$CI_PROJECT_ID;CI_PROJECT_NAME=$CI_PROJECT_NAME;CI_PROJECT_NAMESPACE=$CI_PROJECT_NAMESPACE;CI_PROJECT_URL=$CI_PROJECT_URL;CI_PIPELINE_ID=$CI_PIPELINE_ID;CI_PIPELINE_URL=$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID;CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME;CI_JOB_ID=$CI_JOB_ID;CI_JOB_URL=$CI_PROJECT_URL/-/jobs/$CI_JOB_ID;CI_JOB_NAME=$CI_JOB_NAME;CI_JOB_STAGE=$CI_JOB_STAGE;CI_RUNNER_ID=$CI_RUNNER_ID;GITLAB_USER_ID=$GITLAB_USER_ID;CI_SERVER_VERSION=$CI_SERVER_VERSION" /builds/psono/psono-client/dist/webclient/psono.webclient.PW.zip psono/client/$CI_COMMIT_REF_NAME/webclient.zip
|
||||
# - ./jfrog rt sp "psono/client/$CI_COMMIT_REF_NAME/webclient.zip" "CI_COMMIT_TAG=$CI_COMMIT_TAG" || true
|
||||
# - mv /builds/psono/psono-client/build/webclient ../
|
||||
# - rm -Rf *
|
||||
# - rm -Rf .* 2> /dev/null || true
|
||||
# - mv ../webclient/* ./
|
||||
# artifacts:
|
||||
# name: "webclient_$CI_COMMIT_REF_NAME"
|
||||
# paths:
|
||||
# - ./*
|
||||
#
|
||||
#release-artifacts:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: release
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - apt-get update
|
||||
# - apt-get install -y curl
|
||||
# - curl -fL https://getcli.jfrog.io | sh
|
||||
# - ./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false
|
||||
# - ./jfrog rt cp --flat psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip psono/client/latest/
|
||||
# - ./jfrog rt cp --flat psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip psono/client/latest/
|
||||
# - ./jfrog rt cp --flat psono/client/$CI_COMMIT_REF_NAME/webclient.zip psono/client/latest/
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#release-docker:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: release
|
||||
# image: psono-docker.jfrog.io/docker:20.10.17-git
|
||||
# services:
|
||||
# - name: docker:20-dind
|
||||
# alias: docker
|
||||
# command: ["--tls=false"]
|
||||
# variables:
|
||||
# DOCKER_DRIVER: overlay2
|
||||
# DOCKER_HOST: tcp://docker:2375/
|
||||
# DOCKER_TLS_CERTDIR: ""
|
||||
# script:
|
||||
# - docker info
|
||||
# - echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
|
||||
# - docker pull $CONTAINER_TEST_IMAGE
|
||||
# - docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
|
||||
# - docker push $CONTAINER_RELEASE_IMAGE
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#deploy-docker:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# image: psono-docker.jfrog.io/docker:20.10.17-git
|
||||
# services:
|
||||
# - name: docker:20-dind
|
||||
# alias: docker
|
||||
# command: ["--tls=false"]
|
||||
# variables:
|
||||
# DOCKER_DRIVER: overlay2
|
||||
# DOCKER_HOST: tcp://docker:2375/
|
||||
# DOCKER_TLS_CERTDIR: ""
|
||||
# script:
|
||||
# - echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
|
||||
# - echo $docker_hub_credentials | docker login --username=psonogitlab --password-stdin
|
||||
# - sh ./var/deploy-docker.sh
|
||||
# environment:
|
||||
# name: production
|
||||
# url: https://psono.pw
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#deploy-github:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# image: psono-docker.jfrog.io/docker:20.10.17-git
|
||||
# services:
|
||||
# - name: docker:20-dind
|
||||
# alias: docker
|
||||
# command: ["--tls=false"]
|
||||
# variables:
|
||||
# DOCKER_DRIVER: overlay2
|
||||
# DOCKER_HOST: tcp://docker:2375/
|
||||
# DOCKER_TLS_CERTDIR: ""
|
||||
# script:
|
||||
# - sh ./var/deploy-github.sh
|
||||
# environment:
|
||||
# name: github
|
||||
# url: https://github.com/psono/psono-client
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#deploy-chrome:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildchrome
|
||||
# - sh ./var/deploy-chrome-extension.sh
|
||||
# environment:
|
||||
# name: chrome-webstore
|
||||
# url: https://chrome.google.com/webstore/detail/psonopw/eljmjmgjkbmpmfljlmklcfineebidmlo
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#deploy-firefox:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - sh ./var/prep-build.sh
|
||||
# - npm run buildfirefox
|
||||
# - sh ./var/deploy-firefox-extension.sh
|
||||
# environment:
|
||||
# name: firefox-webstore
|
||||
# url: https://addons.mozilla.org/de/firefox/addon/psono-pw-password-manager/
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#deploy-changelog:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: deploy
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - sh ./var/deploy_changelog.sh
|
||||
# environment:
|
||||
# name: static.psono.com
|
||||
# url: https://static.psono.com/gitlab.com/psono/psono-client/changelog.json
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
#
|
||||
#
|
||||
#deploy-nightlyartifacts:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: release
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - sh ./var/deploy_nightlyartifacts.sh
|
||||
# environment:
|
||||
# name: static.psono.com
|
||||
# url: https://get.psono.com/psono/psono-client/nightly/chrome-extension.zip
|
||||
# only:
|
||||
# - develop
|
||||
#
|
||||
#
|
||||
#deploy-releaseartifacts:
|
||||
# except:
|
||||
# - schedules
|
||||
# stage: release
|
||||
# image: psono-docker.jfrog.io/ubuntu:22.04
|
||||
# script:
|
||||
# - sh ./var/deploy_releaseartifacts.sh
|
||||
# environment:
|
||||
# name: static.psono.com
|
||||
# url: https://get.psono.com/psono/psono-client/latest/chrome-extension.zip
|
||||
# only:
|
||||
# - /^v[0-9]*\.[0-9]*\.[0-9]*$/
|
||||
|
@ -11,6 +11,7 @@
|
||||
"buildchrome": "webpack --config webpack.environment.prod.chrome.js",
|
||||
"buildfirefox": "webpack --config webpack.environment.prod.firefox.js",
|
||||
"buildwebclient": "webpack --config webpack.environment.prod.webclient.js",
|
||||
"buildelectron": "webpack --config webpack.environment.prod.electron.js",
|
||||
"buildsw": "node ./src/build-service-worker.js",
|
||||
"test": "jest --detectOpenHandles --forceExit"
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Psono PW</title>
|
||||
<title>Psono</title>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
|
||||
|
@ -356,3 +356,11 @@ p.horizontalline span {
|
||||
margin-left: -200%;
|
||||
width: 0;
|
||||
overflow: hidden; }
|
||||
|
||||
.drag {
|
||||
-webkit-user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
.nodrag {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Psono PW</title>
|
||||
<title>Psono</title>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Psono PW</title>
|
||||
<title>Psono</title>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Psono PW</title>
|
||||
<title>Psono</title>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-touch-icon.png">
|
||||
|
89
src/electron/.gitignore
vendored
Normal file
89
src/electron/.gitignore
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
.DS_Store
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# Webpack
|
||||
.webpack/
|
||||
|
||||
# Electron-Forge
|
||||
out/
|
56
src/electron/config_json.js
Normal file
56
src/electron/config_json.js
Normal file
@ -0,0 +1,56 @@
|
||||
const fs = require("fs");
|
||||
const windows = require("windows");
|
||||
|
||||
let config;
|
||||
|
||||
function getConfigJsonWindows() {
|
||||
if ( typeof config !== 'undefined') {
|
||||
return config
|
||||
}
|
||||
try {
|
||||
keyset = windows.registry('HKLM\\SOFTWARE\\Policies\\Google\\Chrome\\3rdparty\\extensions\\eljmjmgjkbmpmfljlmklcfineebidmlo\\policy')
|
||||
config = keyset.ConfigJson.value
|
||||
} catch (e) {
|
||||
config = null;
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
function getConfigJsonLinux() {
|
||||
if ( typeof config !== 'undefined') {
|
||||
return config
|
||||
}
|
||||
try {
|
||||
const buffer = fs.readFileSync("/etc/opt/chrome/policies/managed/psono.json");
|
||||
config = buffer.toString();
|
||||
} catch (e) {
|
||||
config = null;
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
function getConfigJsonMacOs() {
|
||||
if ( typeof config !== 'undefined') {
|
||||
return config
|
||||
}
|
||||
// TODO implement logic for MacOs
|
||||
return config;
|
||||
}
|
||||
|
||||
function get() {
|
||||
const isWin = process.platform === "win32";
|
||||
const isLinux = process.platform === "linux";
|
||||
const isMacOs = process.platform === "darwin";
|
||||
if (isWin) {
|
||||
return getConfigJsonWindows();
|
||||
} else if (isLinux) {
|
||||
return getConfigJsonLinux();
|
||||
} else if (isMacOs) {
|
||||
return getConfigJsonMacOs();
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
get:get,
|
||||
};
|
0
src/electron/data/js/service-worker-load.js
Normal file
0
src/electron/data/js/service-worker-load.js
Normal file
76
src/electron/forge.config.js
Normal file
76
src/electron/forge.config.js
Normal file
@ -0,0 +1,76 @@
|
||||
module.exports = {
|
||||
packagerConfig: {
|
||||
icon: 'images/icon',
|
||||
executableName: 'psono',
|
||||
osxSign: {}, // object must exist even if empty
|
||||
osxNotarize: {
|
||||
tool: 'notarytool',
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_APPLICATION_SPECIFIC_PASSWORD,
|
||||
teamId: process.env.APPLE_TEAM_ID,
|
||||
}
|
||||
},
|
||||
rebuildConfig: {},
|
||||
makers: [
|
||||
{
|
||||
name: '@electron-forge/maker-squirrel',
|
||||
config: {
|
||||
authors: 'esaqa GmbH',
|
||||
iconUrl: 'https://static.esaqa.com/assets/psono256x256.ico',
|
||||
setupIcon: 'images/icon.ico',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// name: '@electron-forge/maker-wix',
|
||||
// config: {
|
||||
// language: 1033,
|
||||
// name: 'Psono',
|
||||
// upgradeCode: '9bfa6820-f37f-42f6-9977-369f8970366f',
|
||||
// manufacturer: 'esaqa GmbH'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: '@electron-forge/maker-zip',
|
||||
platforms: ['darwin'],
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-deb',
|
||||
config: {
|
||||
options: {
|
||||
maintainer: 'esaqa GmbH',
|
||||
homepage: 'https://psono.com',
|
||||
icon: 'images/icon.png'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-dmg',
|
||||
config: {
|
||||
icon: 'images/icon.icns',
|
||||
name: 'Psono',
|
||||
background: 'installer/mac/background.png',
|
||||
overwrite: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-rpm',
|
||||
config: {
|
||||
options: {
|
||||
homepage: 'https://psono.com'
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
publishers: [
|
||||
{
|
||||
name: '@electron-forge/publisher-github',
|
||||
config: {
|
||||
repository: {
|
||||
owner: 'psono',
|
||||
name: 'psono-client'
|
||||
},
|
||||
prerelease: true
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
BIN
src/electron/images/icon.icns
Normal file
BIN
src/electron/images/icon.icns
Normal file
Binary file not shown.
BIN
src/electron/images/icon.ico
Normal file
BIN
src/electron/images/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 272 KiB |
BIN
src/electron/images/icon.png
Normal file
BIN
src/electron/images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
109
src/electron/index.js
Normal file
109
src/electron/index.js
Normal file
@ -0,0 +1,109 @@
|
||||
const { app, BrowserWindow, session, ipcMain, shell } = require('electron');
|
||||
const path = require('path');
|
||||
const process = require('process');
|
||||
const configJson = require('./config_json');
|
||||
|
||||
require('update-electron-app')({
|
||||
repo: 'psono/psono-client',
|
||||
updateInterval: '1 hour',
|
||||
logger: require('electron-log')
|
||||
})
|
||||
|
||||
// we force that everything is sandboxed as we are loading untrusted content (e.g. by redirecting to an OAUTH provider)
|
||||
app.enableSandbox()
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
app.setAppUserModelId("Psono");
|
||||
}
|
||||
|
||||
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
|
||||
if (require('electron-squirrel-startup')) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
|
||||
const createWindow = () => {
|
||||
|
||||
// secure CSP
|
||||
session.defaultSession.webRequest.onHeadersReceived((details, callback) => {
|
||||
callback({
|
||||
responseHeaders: {
|
||||
...details.responseHeaders,
|
||||
'Content-Security-Policy': ["default-src 'none'; manifest-src 'self'; connect-src *; font-src 'self'; img-src 'self' data:; script-src 'self'; style-src 'self' 'unsafe-inline'; object-src 'self'; child-src 'self'"]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
icon: path.join(__dirname, 'images', 'icon.png'),
|
||||
backgroundColor: '#151f2b',
|
||||
width: 1024,
|
||||
height: 768,
|
||||
minWidth: 800,
|
||||
minHeight: 750,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
},
|
||||
titleBarStyle: 'hidden',
|
||||
titleBarOverlay: {
|
||||
color: '#151f2b',
|
||||
symbolColor: '#b1b6c1',
|
||||
height: 32
|
||||
}
|
||||
});
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadFile(path.join(__dirname, 'src', 'index.html'));
|
||||
|
||||
// Open the DevTools.
|
||||
//mainWindow.webContents.openDevTools();
|
||||
|
||||
const {session: {webRequest}} = mainWindow.webContents;
|
||||
|
||||
mainWindow.webContents.on('will-navigate', function(e, url) {
|
||||
if (url.startsWith('http')) {
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
}
|
||||
});
|
||||
|
||||
webRequest.onBeforeRequest({
|
||||
urls: [
|
||||
'https://psono.com/redirect*'
|
||||
]
|
||||
}, async ({url}) => {
|
||||
const hash = url.slice('https://psono.com/redirect#'.length)
|
||||
await mainWindow.loadFile('src/index.html', { hash: hash });
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', () => {
|
||||
ipcMain.handle('getConfigJson', configJson.get)
|
||||
return createWindow()
|
||||
});
|
||||
|
||||
// Quit when all windows are closed, except on macOS. There, it's common
|
||||
// for applications and their menu bar to stay active until the user quits
|
||||
// explicitly with Cmd + Q.
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
// On OS X it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
|
||||
// In this file you can include the rest of your app's specific main process
|
||||
// code. You can also put them in separate files and import them here.
|
BIN
src/electron/installer/mac/background.png
Normal file
BIN
src/electron/installer/mac/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
11281
src/electron/package-lock.json
generated
Normal file
11281
src/electron/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
37
src/electron/package.json
Normal file
37
src/electron/package.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "psono",
|
||||
"productName": "Psono",
|
||||
"version": "1.1.0",
|
||||
"description": "Psono Password manager",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "electron-forge start",
|
||||
"package": "electron-forge package",
|
||||
"make": "electron-forge make",
|
||||
"publish": "electron-forge publish",
|
||||
"lint": "echo \"No linting configured\""
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "esaqa GmbH",
|
||||
"email": "support@esaqa.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"electron-log": "^5.0.0-beta.16",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"update-electron-app": "^2.0.1",
|
||||
"windows": "^0.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^6.0.5",
|
||||
"@electron-forge/maker-deb": "^6.0.5",
|
||||
"@electron-forge/maker-dmg": "^6.0.5",
|
||||
"@electron-forge/maker-rpm": "^6.0.5",
|
||||
"@electron-forge/maker-squirrel": "^6.0.5",
|
||||
"@electron-forge/maker-wix": "^6.0.5",
|
||||
"@electron-forge/maker-zip": "^6.0.5",
|
||||
"@electron-forge/publisher-github": "^6.0.5",
|
||||
"electron": "23.0.0"
|
||||
}
|
||||
}
|
8
src/electron/preload.js
Normal file
8
src/electron/preload.js
Normal file
@ -0,0 +1,8 @@
|
||||
// See the Electron documentation for details on how to use preload scripts:
|
||||
// https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts
|
||||
|
||||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI',{
|
||||
getConfigJson: () => ipcRenderer.invoke('getConfigJson')
|
||||
})
|
@ -4,6 +4,7 @@ import CssBaseline from "@material-ui/core/CssBaseline";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Sidebar from "./sidebar";
|
||||
import Topbar from "./topbar";
|
||||
import deviceService from "../services/device";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
@ -11,7 +12,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
// necessary for content to be below app bar
|
||||
toolbar: {
|
||||
minHeight: "50px",
|
||||
minHeight: deviceService.hasTitlebar() ? "82px" : "50px",
|
||||
},
|
||||
fullContent: {
|
||||
flexGrow: 1,
|
||||
|
@ -10,6 +10,7 @@ import AutoSizer from "react-virtualized-auto-sizer";
|
||||
import offlineCache from "../../services/offline-cache";
|
||||
import datastorePassword from "../../services/datastore-password";
|
||||
import DatastoreTreeVirtualElement from "./datastore-tree-virtual-element";
|
||||
import deviceService from "../../services/device";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
fullWidth: {
|
||||
@ -143,7 +144,7 @@ const DatastoreTree = (props) => {
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div className={"tree"} style={{ height: 'calc(100vh - 200px)' }}>
|
||||
<div className={"tree"} style={{ height: deviceService.hasTitlebar() ? 'calc(100vh - 232px)' : 'calc(100vh - 200px)' }}>
|
||||
<AutoSizer>
|
||||
{({ height, width }) => (
|
||||
<List
|
||||
|
98
src/js/components/frame-controls.js
Normal file
98
src/js/components/frame-controls.js
Normal file
@ -0,0 +1,98 @@
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import Container from "@material-ui/core/Container";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
|
||||
import browserClient from "../services/browser-client";
|
||||
import deviceService from "../services/device";
|
||||
import action from "../actions/bound-action-creators";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
container: {
|
||||
height: "32px",
|
||||
},
|
||||
titlebar: {
|
||||
display: 'block',
|
||||
position: 'fixed',
|
||||
height: '32px',
|
||||
width: `calc(100% - 2px)`,
|
||||
padding: '4px',
|
||||
color: '#b1b6c1',
|
||||
},
|
||||
dragRegion: {
|
||||
width: `calc(100% + 132px)`,
|
||||
height: '100%',
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'auto 138px',
|
||||
},
|
||||
windowTitle: {
|
||||
gridColumn: 1,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
marginLeft: '8px',
|
||||
overflow: 'hidden',
|
||||
fontFamily: '"Segoe UI", sans-serif',
|
||||
fontSize: '12px',
|
||||
},
|
||||
windowTitleText: {
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
lineHeight: 1.5,
|
||||
},
|
||||
macTitle: {
|
||||
gridColumn: 1,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
marginLeft: '8px',
|
||||
overflow: 'hidden',
|
||||
fontFamily: '"Segoe UI", sans-serif',
|
||||
fontSize: '12px',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
macTitleText: {
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
lineHeight: 1.5,
|
||||
},
|
||||
}));
|
||||
|
||||
const FrameControls = (props) => {
|
||||
const classes = useStyles();
|
||||
const hasTitlebar = deviceService.hasTitlebar();
|
||||
const isMac = deviceService.isMac();
|
||||
|
||||
if (!hasTitlebar) return null;
|
||||
|
||||
let title;
|
||||
if (isMac) {
|
||||
title = (
|
||||
<div className={classes.macTitle}>
|
||||
<span className={classes.macTitleText}>Psono</span>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
title = (
|
||||
<div className={classes.windowTitle}>
|
||||
<span className={classes.windowTitleText}>Psono</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Container
|
||||
maxWidth={false}
|
||||
disableGutters={true}
|
||||
className={classes.container}
|
||||
>
|
||||
<div className={classes.titlebar}>
|
||||
<div className={classes.dragRegion + " drag"}>
|
||||
{title}
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
)
|
||||
};
|
||||
|
||||
export default FrameControls;
|
@ -24,6 +24,7 @@ import PropTypes from "prop-types";
|
||||
|
||||
import RuleIcon from "./icons/Rule";
|
||||
import browserClient from "../services/browser-client";
|
||||
import deviceService from "../services/device";
|
||||
|
||||
const drawerWidth = 240;
|
||||
|
||||
@ -37,7 +38,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
// necessary for content to be below app bar
|
||||
toolbar: {
|
||||
minHeight: "50px",
|
||||
minHeight: deviceService.hasTitlebar() ? "82px" : "50px",
|
||||
},
|
||||
drawerPaper: {
|
||||
width: drawerWidth,
|
||||
|
@ -27,6 +27,8 @@ import Typography from "@material-ui/core/Typography";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import FrameControls from "./frame-controls";
|
||||
|
||||
import store from "../services/store";
|
||||
import user from "../services/user";
|
||||
import offlineCache from "../services/offline-cache";
|
||||
@ -151,6 +153,7 @@ const Topbar = (props) => {
|
||||
|
||||
return (
|
||||
<AppBar position="fixed" className={classes.appBar}>
|
||||
<FrameControls />
|
||||
<Container maxWidth="lg">
|
||||
<Toolbar
|
||||
disableGutters={true}
|
||||
@ -265,11 +268,11 @@ const Topbar = (props) => {
|
||||
open={Boolean(anchorTopMenuEl)}
|
||||
onClose={closeTopMenu}
|
||||
anchorOrigin={{
|
||||
vertical: "top",
|
||||
vertical: "bottom",
|
||||
horizontal: "right",
|
||||
}}
|
||||
transformOrigin={{
|
||||
vertical: "bottom",
|
||||
vertical: "top",
|
||||
horizontal: "right",
|
||||
}}
|
||||
>
|
||||
|
@ -2,16 +2,18 @@ import React, { Suspense } from "react";
|
||||
|
||||
import { render } from "react-dom";
|
||||
import { HashLoader } from "react-spinners";
|
||||
import CssBaseline from "@material-ui/core/CssBaseline";
|
||||
import { ThemeProvider } from "@material-ui/core/styles";
|
||||
import { I18nextProvider } from "react-i18next";
|
||||
import { HashRouter } from "react-router-dom";
|
||||
import { createBrowserHistory } from "history";
|
||||
import { persistStore } from "redux-persist";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
import { Provider } from "react-redux";
|
||||
import { MuiPickersUtilsProvider } from "@material-ui/pickers";
|
||||
import DateFnsUtils from "@date-io/date-fns";
|
||||
|
||||
import CssBaseline from "@material-ui/core/CssBaseline";
|
||||
import { ThemeProvider } from "@material-ui/core/styles";
|
||||
import { MuiPickersUtilsProvider } from "@material-ui/pickers";
|
||||
|
||||
import store from "./services/store";
|
||||
import datastoreSettingService from "./services/datastore-setting";
|
||||
import i18n from "./i18n";
|
||||
@ -43,6 +45,7 @@ let persistor = persistStore(store, null, () => {
|
||||
});
|
||||
const customHistory = createBrowserHistory();
|
||||
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<MuiPickersUtilsProvider utils={DateFnsUtils}>
|
||||
|
@ -59,6 +59,8 @@ function getClientType(url) {
|
||||
return "firefox_extension";
|
||||
} else if (TARGET === "chrome") {
|
||||
return "chrome_extension";
|
||||
} else if (TARGET === "electron") {
|
||||
return "electron";
|
||||
} else {
|
||||
return "webclient";
|
||||
}
|
||||
@ -88,6 +90,8 @@ function getSamlReturnToUrl() {
|
||||
} else if (TARGET === "chrome") {
|
||||
return 'https://psono.com/redirect#!/saml/token/'
|
||||
//return chrome.identity.getRedirectURL() + "data/index.html#!/saml/token/";
|
||||
} else if (TARGET === "electron") {
|
||||
return 'https://psono.com/redirect#!/saml/token/'
|
||||
} else {
|
||||
return window.location.href.split("#")[0].split("/").slice(0, -1).join("/") + "/index.html#!/saml/token/";
|
||||
}
|
||||
@ -105,6 +109,8 @@ function getOidcReturnToUrl() {
|
||||
} else if (TARGET === "chrome") {
|
||||
return 'https://psono.com/redirect#!/oidc/token/'
|
||||
//return chrome.identity.getRedirectURL() + "data/index.html#!/oidc/token/";
|
||||
} else if (TARGET === "electron") {
|
||||
return 'https://psono.com/redirect#!/oidc/token/'
|
||||
} else {
|
||||
return window.location.href.split("#")[0].split("/").slice(0, -1).join("/") + "/index.html#!/oidc/token/";
|
||||
}
|
||||
@ -426,6 +432,19 @@ function loadConfig() {
|
||||
chrome.storage.managed.get("ConfigJson", onStorageRetrieve);
|
||||
}
|
||||
};
|
||||
} else if (TARGET === "electron") {
|
||||
onSuccess = async function (origJsonConfig) {
|
||||
let newConfig = origJsonConfig.data;
|
||||
const electronsConfigJson = await window.electronAPI.getConfigJson();
|
||||
if (electronsConfigJson) {
|
||||
try {
|
||||
newConfig = JSON.parse(electronsConfigJson);
|
||||
} catch (e) {
|
||||
// pass
|
||||
}
|
||||
}
|
||||
return resolve(standardizeConfig(newConfig, "https://www.psono.pw/"));
|
||||
};
|
||||
} else {
|
||||
onSuccess = function (origJsonConfig) {
|
||||
const newConfig = origJsonConfig.data;
|
||||
@ -768,6 +787,10 @@ function notify(content) {
|
||||
iconUrl: "img/icon-32.png",
|
||||
});
|
||||
});
|
||||
} else if (TARGET === "electron") {
|
||||
new Notification(content, {
|
||||
silent: true,
|
||||
})
|
||||
} else {
|
||||
const options = { silent: true };
|
||||
function sendNotification() {
|
||||
|
@ -27,6 +27,51 @@ function getDeviceFingerprint() {
|
||||
return fingerprint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns weather we are supposed to show a title bar
|
||||
*
|
||||
* @returns {boolean} Is this an electron app
|
||||
*/
|
||||
function hasTitlebar() {
|
||||
return isElectron() && (isWindows() || isMac());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns weather we have an electron app
|
||||
*
|
||||
* @returns {boolean} Is this an electron app
|
||||
*/
|
||||
function isElectron() {
|
||||
return TARGET === 'electron';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns weather we have a windows machine
|
||||
*
|
||||
* @returns {boolean} Is this a windows device
|
||||
*/
|
||||
function isWindows() {
|
||||
return clientJs.isWindows()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns weather we have a mac
|
||||
*
|
||||
* @returns {boolean} Is this a mac device
|
||||
*/
|
||||
function isMac() {
|
||||
return clientJs.isMac()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns weather we have a linux device
|
||||
*
|
||||
* @returns {boolean} Is this a linux device
|
||||
*/
|
||||
function isLinux() {
|
||||
return clientJs.isLinux()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns weather we have an android device or not
|
||||
*
|
||||
@ -111,6 +156,11 @@ function getDeviceDescription() {
|
||||
|
||||
const deviceService = {
|
||||
getDeviceFingerprint: getDeviceFingerprint,
|
||||
hasTitlebar: hasTitlebar,
|
||||
isElectron: isElectron,
|
||||
isWindows: isWindows,
|
||||
isLinux: isLinux,
|
||||
isMac: isMac,
|
||||
isMobileAndroid: isMobileAndroid,
|
||||
isMobileIos: isMobileIos,
|
||||
isMobile: isMobile,
|
||||
|
@ -1,17 +1,21 @@
|
||||
import React from "react";
|
||||
import LoginViewForm from "./login-form";
|
||||
import { useParams } from "react-router-dom";
|
||||
import FrameControls from "../../components/frame-controls";
|
||||
|
||||
const LoginView = (props) => {
|
||||
let { samlTokenId, oidcTokenId } = useParams();
|
||||
return (
|
||||
<div className={"loginbox dark"}>
|
||||
<img src="img/logo.png" alt="Psono Web Client" id="logo" />
|
||||
<a href="https://psono.com/" target="_blank" rel="noopener" className="infolabel">
|
||||
<i className="fa fa-info-circle" aria-hidden="true" />
|
||||
</a>
|
||||
<LoginViewForm samlTokenId={samlTokenId} oidcTokenId={oidcTokenId} />
|
||||
</div>
|
||||
<>
|
||||
<FrameControls />
|
||||
<div className={"loginbox dark"}>
|
||||
<img src="img/logo.png" alt="Psono Web Client" id="logo" />
|
||||
<a href="https://psono.com/" target="_blank" rel="noopener" className="infolabel">
|
||||
<i className="fa fa-info-circle" aria-hidden="true" />
|
||||
</a>
|
||||
<LoginViewForm samlTokenId={samlTokenId} oidcTokenId={oidcTokenId} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -550,6 +550,9 @@ const LoginViewForm = (props) => {
|
||||
);
|
||||
}
|
||||
});
|
||||
}, (result) => {
|
||||
setLoginLoading(false);
|
||||
console.log(result);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -596,6 +599,9 @@ const LoginViewForm = (props) => {
|
||||
);
|
||||
}
|
||||
});
|
||||
}, (result) => {
|
||||
setLoginLoading(false);
|
||||
console.log(result);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -1,17 +1,20 @@
|
||||
import React from "react";
|
||||
import LostPasswordViewForm from "./lost-password-form";
|
||||
import { useParams } from "react-router-dom";
|
||||
import FrameControls from "../../components/frame-controls";
|
||||
|
||||
const LostPasswordView = (props) => {
|
||||
let { samlTokenId, oidcTokenId } = useParams();
|
||||
return (
|
||||
<div className={"lostpasswordbox dark"}>
|
||||
<img src="img/logo.png" alt="Psono Web Client" id="logo" />
|
||||
<a href="https://psono.com/" target="_blank" rel="noopener" className="infolabel">
|
||||
<i className="fa fa-info-circle" aria-hidden="true" />
|
||||
</a>
|
||||
<LostPasswordViewForm samlTokenId={samlTokenId} oidcTokenId={oidcTokenId} />
|
||||
</div>
|
||||
return (<>
|
||||
<FrameControls />
|
||||
<div className={"lostpasswordbox dark"}>
|
||||
<img src="img/logo.png" alt="Psono Web Client" id="logo" />
|
||||
<a href="https://psono.com/" target="_blank" rel="noopener" className="infolabel">
|
||||
<i className="fa fa-info-circle" aria-hidden="true" />
|
||||
</a>
|
||||
<LostPasswordViewForm samlTokenId={samlTokenId} oidcTokenId={oidcTokenId} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -16,9 +16,8 @@ import browserClient from "../../services/browser-client";
|
||||
import { useParams } from "react-router-dom";
|
||||
import DOMPurify from "dompurify";
|
||||
import offlineCacheService from "../../services/offline-cache";
|
||||
import datastorePasswordService from "../../services/datastore-password";
|
||||
import DialogUnlockOfflineCache from "../../components/dialogs/unlock-offline-cache";
|
||||
import secret from "../../services/secret";
|
||||
import deviceService from "../../services/device";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
@ -43,7 +42,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
// necessary for content to be below app bar
|
||||
toolbar: {
|
||||
minHeight: "50px",
|
||||
minHeight: deviceService.hasTitlebar() ? "82px" : "50px",
|
||||
},
|
||||
fullContent: {
|
||||
flexGrow: 1,
|
||||
|
@ -24,6 +24,7 @@ import DeleteIcon from "@material-ui/icons/Delete";
|
||||
import DialogGpgAddressBook from "../../components/dialogs/gpg-address-book";
|
||||
import { BarLoader } from "react-spinners";
|
||||
import { useParams } from "react-router-dom";
|
||||
import deviceService from "../../services/device";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
@ -48,7 +49,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
},
|
||||
// necessary for content to be below app bar
|
||||
toolbar: {
|
||||
minHeight: "50px",
|
||||
minHeight: deviceService.hasTitlebar() ? "82px" : "50px",
|
||||
},
|
||||
fullContent: {
|
||||
flexGrow: 1,
|
||||
|
@ -1,7 +1,11 @@
|
||||
import React, { useState } from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import axios from "axios";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Container from "@material-ui/core/Container";
|
||||
import axios from "axios";
|
||||
import Button from "@material-ui/core/Button";
|
||||
|
||||
import FrameControls from "../../components/frame-controls";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
dark: {
|
||||
@ -14,11 +18,18 @@ const useStyles = makeStyles((theme) => ({
|
||||
privacyPolicyBox: {
|
||||
padding: "20px 20px 20px 20px",
|
||||
borderRadius: "4px",
|
||||
position: "relative",
|
||||
},
|
||||
backButton: {
|
||||
position: "absolute",
|
||||
top: "20px",
|
||||
right: "20px",
|
||||
},
|
||||
}));
|
||||
|
||||
const PrivacyPolicyView = (props) => {
|
||||
const classes = useStyles();
|
||||
const { t } = useTranslation();
|
||||
const [privacyPolicy, setPrivacyPolicy] = useState("");
|
||||
|
||||
React.useEffect(() => {
|
||||
@ -34,12 +45,20 @@ const PrivacyPolicyView = (props) => {
|
||||
});
|
||||
}, []);
|
||||
|
||||
const back = () => {
|
||||
window.location.href = "index.html";
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={"wrapper"}>
|
||||
<Container className={classes.privacyPolicyBox + " " + classes.dark}>
|
||||
<div dangerouslySetInnerHTML={{ __html: privacyPolicy }} />
|
||||
</Container>
|
||||
</div>
|
||||
<>
|
||||
<FrameControls />
|
||||
<div className={"wrapper"}>
|
||||
<Container className={classes.privacyPolicyBox + " " + classes.dark}>
|
||||
<Button className={classes.backButton} onClick={back} variant="contained" color="primary">{t("BACK")}</Button>
|
||||
<div dangerouslySetInnerHTML={{ __html: privacyPolicy }} />
|
||||
</Container>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default PrivacyPolicyView;
|
||||
|
@ -1,17 +1,20 @@
|
||||
import React from "react";
|
||||
import RegisterViewForm from "./register-form";
|
||||
import { useParams } from "react-router-dom";
|
||||
import FrameControls from "../../components/frame-controls";
|
||||
|
||||
const RegisterView = (props) => {
|
||||
let { samlTokenId, oidcTokenId } = useParams();
|
||||
return (
|
||||
<div className={"registerbox dark"}>
|
||||
<img src="img/logo.png" alt="Psono Web Client" id="logo" />
|
||||
<a href="https://psono.com/" target="_blank" rel="noopener" className="infolabel">
|
||||
<i className="fa fa-info-circle" aria-hidden="true" />
|
||||
</a>
|
||||
<RegisterViewForm samlTokenId={samlTokenId} oidcTokenId={oidcTokenId} />
|
||||
</div>
|
||||
return (<>
|
||||
<FrameControls />
|
||||
<div className={"registerbox dark"}>
|
||||
<img src="img/logo.png" alt="Psono Web Client" id="logo" />
|
||||
<a href="https://psono.com/" target="_blank" rel="noopener" className="infolabel">
|
||||
<i className="fa fa-info-circle" aria-hidden="true" />
|
||||
</a>
|
||||
<RegisterViewForm samlTokenId={samlTokenId} oidcTokenId={oidcTokenId} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -8,9 +8,17 @@ echo "$GOOGLE_APPLICATION_CREDENTIALS" > "/root/key.json" && \
|
||||
gcloud auth activate-service-account --key-file=/root/key.json && \
|
||||
curl -fL https://getcli.jfrog.io | sh && \
|
||||
./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.rpm --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.amd64.deb --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.exe --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.dmg --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/webclient.zip --flat && \
|
||||
gsutil cp psono.x86_64.rpm gs://get.psono.com/$CI_PROJECT_PATH/nightly/psono.x86_64.rpm && \
|
||||
gsutil cp psono.amd64.deb gs://get.psono.com/$CI_PROJECT_PATH/nightly/psono.amd64.deb && \
|
||||
gsutil cp psono.x86_64.exe gs://get.psono.com/$CI_PROJECT_PATH/nightly/psono.x86_64.exe && \
|
||||
gsutil cp psono.x86_64.dmg gs://get.psono.com/$CI_PROJECT_PATH/nightly/psono.x86_64.dmg && \
|
||||
gsutil cp firefox-extension.zip gs://get.psono.com/$CI_PROJECT_PATH/nightly/firefox-extension.zip && \
|
||||
gsutil cp chrome-extension.zip gs://get.psono.com/$CI_PROJECT_PATH/nightly/chrome-extension.zip && \
|
||||
gsutil cp webclient.zip gs://get.psono.com/$CI_PROJECT_PATH/nightly/webclient.zip
|
||||
|
@ -8,12 +8,23 @@ echo "$GOOGLE_APPLICATION_CREDENTIALS" > "/root/key.json" && \
|
||||
gcloud auth activate-service-account --key-file=/root/key.json && \
|
||||
curl -fL https://getcli.jfrog.io | sh && \
|
||||
./jfrog config add rt-server-1 --artifactory-url=https://psono.jfrog.io/psono --user=gitlab --password=$artifactory_credentials --interactive=false && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.x86_64.rpm --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.amd64.deb --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/psono.dmg --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/firefox-extension.zip --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/chrome-extension.zip --flat && \
|
||||
./jfrog rt dl psono/client/$CI_COMMIT_REF_NAME/webclient.zip --flat && \
|
||||
gsutil cp psono.x86_64.rpm gs://get.psono.com/$CI_PROJECT_PATH/latest/psono.x86_64.rpm && \
|
||||
gsutil cp psono.amd64.deb gs://get.psono.com/$CI_PROJECT_PATH/latest/psono.amd64.deb && \
|
||||
gsutil cp psono.x86_64.exe gs://get.psono.com/$CI_PROJECT_PATH/latest/psono.x86_64.exe && \
|
||||
gsutil cp psono.dmg gs://get.psono.com/$CI_PROJECT_PATH/latest/psono.dmg && \
|
||||
gsutil cp firefox-extension.zip gs://get.psono.com/$CI_PROJECT_PATH/latest/firefox-extension.zip && \
|
||||
gsutil cp chrome-extension.zip gs://get.psono.com/$CI_PROJECT_PATH/latest/chrome-extension.zip && \
|
||||
gsutil cp webclient.zip gs://get.psono.com/$CI_PROJECT_PATH/latest/webclient.zip && \
|
||||
gsutil cp psono.x86_64.rpm gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/psono.x86_64.rpm && \
|
||||
gsutil cp psono.amd64.deb gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/psono.amd64.deb && \
|
||||
gsutil cp psono.x86_64.exe gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/psono.x86_64.exe && \
|
||||
gsutil cp psono.dmg gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/psono.dmg && \
|
||||
gsutil cp firefox-extension.zip gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/firefox-extension.zip && \
|
||||
gsutil cp chrome-extension.zip gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/chrome-extension.zip && \
|
||||
gsutil cp webclient.zip gs://get.psono.com/$CI_PROJECT_PATH/$CI_COMMIT_REF_NAME/webclient.zip
|
||||
|
30
var/download_translations_from_artifactory.ps1
Normal file
30
var/download_translations_from_artifactory.ps1
Normal file
@ -0,0 +1,30 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-da.json" -outfile "src/common/data/translations/locale-da.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-ca.json" -outfile "src/common/data/translations/locale-ca.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-sv.json" -outfile "src/common/data/translations/locale-sv.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-no.json" -outfile "src/common/data/translations/locale-no.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-he.json" -outfile "src/common/data/translations/locale-he.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-ar.json" -outfile "src/common/data/translations/locale-ar.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-hi.json" -outfile "src/common/data/translations/locale-hi.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-hu.json" -outfile "src/common/data/translations/locale-hu.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-bn.json" -outfile "src/common/data/translations/locale-bn.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-cs.json" -outfile "src/common/data/translations/locale-cs.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-de.json" -outfile "src/common/data/translations/locale-de.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-en.json" -outfile "src/common/data/translations/locale-en.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-es.json" -outfile "src/common/data/translations/locale-es.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-fi.json" -outfile "src/common/data/translations/locale-fi.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-fr.json" -outfile "src/common/data/translations/locale-fr.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-hr.json" -outfile "src/common/data/translations/locale-hr.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-it.json" -outfile "src/common/data/translations/locale-it.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-ja.json" -outfile "src/common/data/translations/locale-ja.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-ko.json" -outfile "src/common/data/translations/locale-ko.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-nl.json" -outfile "src/common/data/translations/locale-nl.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-pt.json" -outfile "src/common/data/translations/locale-pt.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-pt-br.json" -outfile "src/common/data/translations/locale-pt-br.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-pl.json" -outfile "src/common/data/translations/locale-pl.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-ru.json" -outfile "src/common/data/translations/locale-ru.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-sk.json" -outfile "src/common/data/translations/locale-sk.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-vi.json" -outfile "src/common/data/translations/locale-vi.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-zh-cn.json" -outfile "src/common/data/translations/locale-zh-cn.json"
|
||||
wget "https://psono.jfrog.io/psono/psono/client/languages/locale-zh-hant.json" -outfile "src/common/data/translations/locale-zh-hant.json"
|
@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# poeditor language codes: https://poeditor.com/docs/languages
|
||||
apt-get update && \
|
||||
apt-get install -y curl && \
|
||||
curl -o src/common/data/translations/locale-da.json https://psono.jfrog.io/psono/psono/client/languages/locale-da.json && \
|
||||
curl -o src/common/data/translations/locale-ca.json https://psono.jfrog.io/psono/psono/client/languages/locale-ca.json && \
|
||||
curl -o src/common/data/translations/locale-sv.json https://psono.jfrog.io/psono/psono/client/languages/locale-sv.json && \
|
||||
|
3
var/verify_signature.ps1
Normal file
3
var/verify_signature.ps1
Normal file
@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe' verify /v /pa 'src\electron\out\make\squirrel.windows\x64\Psono-1.1.0 Setup.exe'
|
44
webpack.environment.prod.electron.js
Normal file
44
webpack.environment.prod.electron.js
Normal file
@ -0,0 +1,44 @@
|
||||
const webpack = require('webpack');
|
||||
const { merge } = require('webpack-merge');
|
||||
const prodConfig = require('./webpack.environment.prod.common');
|
||||
const electron = require('./webpack.target.electron');
|
||||
const ReplaceInFileWebpackPlugin = require('replace-in-file-webpack-plugin');
|
||||
|
||||
const commit_tag = process.env.CI_COMMIT_TAG;
|
||||
const commit_sha = process.env.CI_COMMIT_SHA;
|
||||
|
||||
let version = '1.1.0';
|
||||
let hash = 'abcd1234';
|
||||
|
||||
if (/^v\d*\.\d*\.\d*$/.test(commit_tag)) {
|
||||
version = commit_tag.substring(1);
|
||||
hash = commit_sha.substring(0,8);
|
||||
}
|
||||
|
||||
module.exports = () => {
|
||||
const config = merge(electron, prodConfig);
|
||||
config['plugins'].push(
|
||||
new ReplaceInFileWebpackPlugin([{
|
||||
dir: 'build/electron',
|
||||
files: ['VERSION.txt'],
|
||||
rules: [{
|
||||
search: '1.1.0',
|
||||
replace: version
|
||||
},{
|
||||
search: 'abcd1234',
|
||||
replace: hash
|
||||
}]
|
||||
}])
|
||||
)
|
||||
config['plugins'].push(
|
||||
new ReplaceInFileWebpackPlugin([{
|
||||
dir: 'src/electron',
|
||||
files: ['package.json'],
|
||||
rules: [{
|
||||
search: '"version": "1.1.0"',
|
||||
replace: '"version": "' + version + '"'
|
||||
}]
|
||||
}])
|
||||
)
|
||||
return config
|
||||
};
|
57
webpack.target.electron.js
Normal file
57
webpack.target.electron.js
Normal file
@ -0,0 +1,57 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const webpack = require('webpack');
|
||||
const ReplaceInFileWebpackPlugin = require('replace-in-file-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const path = require('path');
|
||||
|
||||
const commit_tag = process.env.CI_COMMIT_TAG;
|
||||
const commit_sha = process.env.CI_COMMIT_SHA;
|
||||
|
||||
let version = '1.1.0';
|
||||
let hash = 'abcd1234';
|
||||
|
||||
if (/^v\d*\.\d*\.\d*$/.test(commit_tag)) {
|
||||
version = commit_tag.substring(1);
|
||||
hash = commit_sha.substring(0,8);
|
||||
}
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
entry: {
|
||||
'electron/js/bundle.min.js': './src/js/index.js',
|
||||
'electron/js/crypto-worker.js': './src/js/crypto-worker.js',
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'TARGET': JSON.stringify('electron'),
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: path.resolve(__dirname, 'src', 'common', 'data'),
|
||||
to: path.resolve(__dirname, 'build', 'electron'),
|
||||
priority: 5,
|
||||
},
|
||||
{
|
||||
from: path.resolve(__dirname, 'src', 'electron', 'data'),
|
||||
to: path.resolve(__dirname, 'build', 'electron'),
|
||||
priority: 10,
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
new ReplaceInFileWebpackPlugin([{
|
||||
dir: 'build/electron',
|
||||
files: ['VERSION.txt'],
|
||||
rules: [{
|
||||
search: '1.1.0',
|
||||
replace: version
|
||||
},{
|
||||
search: 'abcd1234',
|
||||
replace: hash
|
||||
}]
|
||||
}]),
|
||||
],
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user