Compare commits

...

2 Commits

Author SHA1 Message Date
izzy lyseggen 9aea5ddc97 fix(metrics): remove suuid as it is no longer used (#60) 2022-09-07 10:08:29 +01:00
izzy lyseggen 4d1333c302 ci: add deploy for manager 2 (#59) 2022-08-25 16:20:28 +01:00
6 changed files with 45 additions and 19 deletions
+38
View File
@@ -87,6 +87,30 @@ jobs:
from: '"speckle-sharp-ci-tools/Installers/"'
to: s3://speckle-releases/installers/
deploy-manager2:
docker:
- image: mcr.microsoft.com/dotnet/sdk:6.0
parameters:
slug:
type: string
os:
type: string
extension:
type: string
steps:
- checkout
- attach_workspace:
at: ./
- run:
name: Install Manager Feed CLI
command: dotnet tool install --global Speckle.Manager.Feed
- run:
name: Upload new version
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "0.0.0"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
/root/.dotnet/tools/Speckle.Manager.Feed deploy -s << parameters.slug >> -v ${SEMVER} -u https://releases.speckle.dev/installers/<< parameters.slug >>/<< parameters.slug >>-${SEMVER}.<< parameters.extension >> -o << parameters.os >> -f speckle-sharp-ci-tools/Installers/<< parameters.slug >>/<< parameters.slug >>-${SEMVER}.<< parameters.extension >>
workflows:
build-and-deploy:
jobs:
@@ -119,3 +143,17 @@ workflows:
only: /([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\w+)?$/
branches:
ignore: /.*/ # For testing only! /ci\/.*/
- deploy-manager2:
slug: sketchup
os: Win
extension: exe
requires:
- get-ci-tools
- build-ui
- deploy
filters:
tags:
only: /([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\w+)?$/
branches:
ignore: /.*/ # For testing only! /ci\/.*/
-8
View File
@@ -28,14 +28,6 @@ module SpeckleSystems::SpeckleConnector
accts.select { |acc| acc["isDefault"] }[0] || accts[0]
end
def self.get_suuid
dir = _get_speckle_dir
suuid_path = File.join(dir, "suuid")
return unless File.exist?(suuid_path)
File.read(suuid_path)
end
def self._get_speckle_dir
speckle_dir =
case Sketchup.platform
+1 -1
View File
@@ -147,7 +147,7 @@ module SpeckleSystems::SpeckleConnector
def self.init_local_accounts
puts("Initialisation of Speckle accounts requested by plugin")
@dialog.execute_script("loadAccounts(#{Accounts.load_accounts.to_json}, #{Accounts.get_suuid.to_json})")
@dialog.execute_script("loadAccounts(#{Accounts.load_accounts.to_json})")
end
def self.reload_accounts
+6 -8
View File
@@ -96,16 +96,14 @@ import { bus } from './main'
import userQuery from './graphql/user.gql'
import { onLogin } from './vue-apollo'
global.loadAccounts = function (accounts, suuid) {
console.log('>>> SpeckleSketchup: Loading accounts', accounts, `suuid: ${suuid}`)
global.loadAccounts = function (accounts) {
console.log('>>> SpeckleSketchup: Loading accounts', accounts)
localStorage.setItem('localAccounts', JSON.stringify(accounts))
if (suuid) {
localStorage.setItem('suuid', suuid)
global.setSelectedAccount(accounts.find((acct) => acct['isDefault']))
let uuid = localStorage.getItem('uuid')
if (uuid) {
global.setSelectedAccount(accounts.find((acct) => acct['userInfo']['id'] == uuid))
} else {
global.setSelectedAccount(
accounts.find((acct) => acct['userInfo']['id'] == localStorage.getItem('uuid'))
)
global.setSelectedAccount(accounts.find((acct) => acct['isDefault']))
}
}
-1
View File
@@ -9,7 +9,6 @@ query {
verified
profiles
role
suuid
streams {
totalCount
}
-1
View File
@@ -9,6 +9,5 @@ query User($id: String!) {
verified
profiles
role
suuid
}
}