Compare commits

...

6 Commits

Author SHA1 Message Date
KatKatKateryna 2e1dc329b3 add 2.11.3 whl 2023-02-02 16:52:02 +08:00
KatKatKateryna 221a050df4 typings fix for python 3.7 2023-02-01 22:58:43 +08:00
KatKatKateryna 67480f2f70 CI: return version 2023-01-31 23:24:53 +08:00
KatKatKateryna 0a24379984 typo 2023-01-31 23:15:56 +08:00
KatKatKateryna 6437be9d25 CI signing 2023-01-31 23:15:05 +08:00
KatKatKateryna 644b64bbb3 ci contexts 2023-01-31 22:42:19 +08:00
4 changed files with 21 additions and 8 deletions
+16 -3
View File
@@ -23,6 +23,12 @@ jobs:
- checkout
- attach_workspace:
at: ./
- run:
name: Create Innosetup signing cert
shell: powershell.exe
command: |
echo $env:PFX_B64 > "speckle-sharp-ci-tools\SignTool\AEC Systems Ltd.txt"
certutil -decode "speckle-sharp-ci-tools\SignTool\AEC Systems Ltd.txt" "speckle-sharp-ci-tools\SignTool\AEC Systems Ltd.pfx"
- run:
name: Patch
shell: powershell.exe
@@ -36,7 +42,12 @@ jobs:
python patch_version.py $semver
python setup.py sdist bdist_wheel
Copy-Item -Path "dist\speckle_toolbox-$($ver)-py3-none-any.whl" -Destination "speckle_arcgis_installer"
speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\arcgis.iss
- run:
name: Build Installer
shell: cmd.exe
command:
| # If no tag, use 0.0.0.1 and don't make any YML (for testing only!)
speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\arcgis.iss /Sbyparam=$p
- when:
condition: << parameters.installer >>
steps:
@@ -93,6 +104,7 @@ workflows: #happens with every PR to main
build: # build the installers, but don't persist to workspace for deployment
jobs:
- get-ci-tools:
context: github-dev-bot
filters:
branches:
only:
@@ -106,10 +118,12 @@ workflows: #happens with every PR to main
only:
- main
- /ci\/.*/
context: innosetup
deploy: # build installers and deploy
jobs:
- get-ci-tools:
context: github-dev-bot
filters:
tags:
only: /.*/
@@ -127,13 +141,12 @@ workflows: #happens with every PR to main
only: /([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\w+)?$/
branches:
ignore: /.*/
context: innosetup
- deploy-manager2:
slug: arcgis
os: Win
extension: exe
requires:
- get-ci-tools
- build-deploy-connector-win
filters:
tags:
@@ -17,10 +17,10 @@ pythonPath = os.getenv('APPDATA').replace("\\Roaming","") + r"\Local\ESRI\conda\
def installToolbox(newExec: str):
print("Installing Speckle Toolbox")
mypath = os.path.dirname(__file__)
onlyfiles = [f for f in listdir(mypath) if (isfile(join(mypath, f)) and "-2.11.0-py3-none-any.whl" in str(f))]
onlyfiles = [f for f in listdir(mypath) if (isfile(join(mypath, f)) and "py3-none-any.whl" in str(f))]
onlyfiles.sort(key = lambda x: int(x.replace("speckle_toolbox-","").replace("-py3-none-any.whl","").split(".")[1]) )
whl_file = onlyfiles[len(onlyfiles)-1]
#whl_file = os.path.join(os.path.dirname(__file__), "speckle_toolbox-2.11.0-py3-none-any.whl" )
#whl_file = os.path.join(os.path.dirname(__file__), "speckle_toolbox-2.11.3-py3-none-any.whl" )
subprocess_call([newExec, '-m','pip','install','--upgrade', '--force-reinstall', whl_file])
return
@@ -1,5 +1,5 @@
import json
from typing import Any, List, Union
from typing import Any, List, Tuple, Union
import copy
import os
@@ -163,7 +163,7 @@ def vectorRendererToNative(project: ArcGISProject, active_map, layerGroup, layer
else: return None
def get_rgb_from_speckle(rgb: int) -> tuple[int, int, int]:
def get_rgb_from_speckle(rgb: int) -> Tuple[int, int, int]:
r = g = b = 0
try:
r = (rgb & 0xFF0000) >> 16
@@ -174,7 +174,7 @@ def get_rgb_from_speckle(rgb: int) -> tuple[int, int, int]:
r,g,b = check_rgb(r,g,b)
return r,g,b
def check_rgb(r:int, g:int, b:int) -> tuple[int, int, int]:
def check_rgb(r:int, g:int, b:int) -> Tuple[int, int, int]:
if not isinstance(r, int) or r<0 or r>255: r=g=b=0
if not isinstance(g, int) or g<0 or g>255: r=g=b=0