Skip to content

Commit

Permalink
Merge pull request #78 from specklesystems/dev
Browse files Browse the repository at this point in the history
Merge dev -> main
  • Loading branch information
JR-Morgan authored Aug 8, 2024
2 parents b26801e + 74ab91b commit 1bf6e76
Show file tree
Hide file tree
Showing 16 changed files with 1,900 additions and 416 deletions.
76 changes: 69 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,36 @@ commands:
& $env:SSM\smksp_cert_sync.exe
jobs:
build-visual:
docker:
- image: cimg/node:18.20.3
steps:
- checkout
- run: node --version
- run:
name: "npm install"
command: "npm i"
working_directory: src/powerbi-visual
- run:
name: Set version
command: |
npm version ${CIRCLE_TAG:-2.0.0} --allow-same-version
working_directory: src/powerbi-visual
- run:
name: "npm run build"
command: "npm run build"
working_directory: src/powerbi-visual
- run:
name: "npm run pack"
command: "npm run pack"
working_directory: src/powerbi-visual
- store_artifacts:
path: dist/*.pbiviz
- persist_to_workspace:
root: ./
paths:
- src/powerbi-visual/dist/*.pbiviz

build-connector:
executor:
name: win/default
Expand All @@ -38,14 +68,31 @@ jobs:
- run:
name: "Set connector internal version"
command: |
$env:VERSION = if([string]::IsNullOrEmpty($env:CIRCLE_TAG)) { "2.0.0.$($env:WORKFLOW_NUM)" } else { $env:CIRCLE_TAG }
(Get-Content ./src/powerbi-data-connector/Speckle.pq).replace('[Version = "2.0.0"]', '[Version = "'+$($env:VERSION)+'"]') | Set-Content ./src/powerbi-data-connector/Speckle.pq
$env:VERSION = if([string]::IsNullOrEmpty($env:CIRCLE_TAG)) { "2.0.0" } else { $env:CIRCLE_TAG }
(Get-Content ./Speckle.pq).replace('[Version = "2.0.0"]', '[Version = "'+$($env:VERSION)+'"]') | Set-Content ./Speckle.pq
working_directory: src/powerbi-data-connector
- run:
name: "Build Data Connector"
command: "msbuild ./src/powerbi-data-connector/Speckle.proj /restore /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true"
command: "msbuild Speckle.proj /restore /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true"
working_directory: src/powerbi-data-connector
- run:
name: Create PQX file
command: .\tools\MakePQX\MakePQX.exe pack -mz src/powerbi-data-connector/bin/Speckle.mez -t src/powerbi-data-connector/bin/Speckle.pqx
- persist_to_workspace:
root: ./
paths:
- src/powerbi-data-connector/bin/Speckle.pqx

build-installer:
executor:
name: win/default
shell: powershell.exe
environment:
SSM: 'C:\Program Files\DigiCert\DigiCert One Signing Manager Tools'
steps:
- checkout
- attach_workspace:
at: ./
- unless: # Build installers unsigned on non-tagged builds
condition: << pipeline.git.tag >>
steps:
Expand All @@ -54,7 +101,7 @@ jobs:
shell: cmd.exe #does not work in powershell
environment:
WORKFLOW_NUM: << pipeline.number >>
CIRCLE_TAG: 2.0.999-beta/all
CIRCLE_TAG: 2.0.0
command: .circleci\build-installer.bat
- when: # Setup certificates and build installers signed for tagged builds
condition: << pipeline.git.tag >>
Expand Down Expand Up @@ -85,29 +132,44 @@ jobs:
- run:
name: Upload new version
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.0"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
/root/.dotnet/tools/Speckle.Manager.Feed deploy -s powerbi -v ${SEMVER} -u https://releases.speckle.dev/installers/powerbi/powerbi-${SEMVER}.exe -o Win -a Any -f ./installer/powerbi-${SEMVER}.exe
environment:
WORKFLOW_NUM: << pipeline.number >>

workflows:
build:
jobs:
- build-connector:
context: digicert-keylocker
- build-visual
- build-installer:
context: digicert-keylocker
requires:
- build-connector
- build-visual
deploy:
jobs:
- build-connector:
filters: &deploy_filter
branches:
ignore: /.*/ # For testing only: /ci\/.*/
ignore: /.*/
tags:
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\w{1,10})?$/
context: digicert-keylocker
- deploy-connector-to-feed:
- build-visual:
filters: *deploy_filter
- build-installer:
filters: *deploy_filter
context: digicert-keylocker
requires:
- build-connector
- build-visual
- deploy-connector-to-feed:
filters: *deploy_filter
requires:
- build-installer
context: do-spaces-speckle-releases
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,5 @@ ASALocalRun/
**/.tmp/
**/webpack.statistics.*.html
**/webpack.statistics.html
**/Thumbs.db
**/Thumbs.db
installer/
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ What is Speckle? Check our ![YouTube Video Views](https://img.shields.io/youtube

Give Speckle a try in no time by:

- [![speckle XYZ](https://img.shields.io/badge/https://-speckle.xyz-0069ff?style=flat-square&logo=hackthebox&logoColor=white)](https://speckle.xyz) ⇒ creating an account at our public server
- [![create a droplet](https://img.shields.io/badge/Create%20a%20Droplet-0069ff?style=flat-square&logo=digitalocean&logoColor=white)](https://marketplace.digitalocean.com/apps/speckle-server?refcode=947a2b5d7dc1) ⇒ deploying an instance in 1 click
- [![app.speckle.systems](https://img.shields.io/badge/https://-speckle.xyz-0069ff?style=flat-square&logo=hackthebox&logoColor=white)](https://app.speckle.systems) ⇒ creating an account at our public server

### Resources

Expand Down
2 changes: 1 addition & 1 deletion src/powerbi-data-connector/Speckle.pq
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Version = "2.15.0-rc"]
[Version = "2.0.0"]
section Speckle;

AuthAppId = "spklpwerbi";
Expand Down
86 changes: 44 additions & 42 deletions src/powerbi-data-connector/Speckle.proj
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="BuildMez">
<PropertyGroup>
<Version Condition="'$(Version)' == ''">2.0.0-wip</Version>
<OutputPath Condition="'$(OutputPath)' == ''">$(MSBuildProjectDirectory)\bin\</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">
$(MSBuildProjectDirectory)\obj\</IntermediateOutputPath>
<MezIntermediatePath>$(IntermediateOutputPath)MEZ\</MezIntermediatePath>
<MezOutputPath>$(OutputPath)$(MsBuildProjectName).mez</MezOutputPath>
</PropertyGroup>
<ItemGroup>
<MezContent Include="Speckle.pq" />
<MezContent Include="utilities\**\*.pqm" />
<MezContent Include="speckle\**\*.pqm" />
<MezContent Include="assets\SpeckleLogo16.png" />
<MezContent Include="assets\SpeckleLogo20.png" />
<MezContent Include="assets\SpeckleLogo24.png" />
<MezContent Include="assets\SpeckleLogo32.png" />
<MezContent Include="assets\SpeckleLogo40.png" />
<MezContent Include="assets\SpeckleLogo48.png" />
<MezContent Include="assets\SpeckleLogo64.png" />
<MezContent Include="assets\SpeckleLogo80.png" />
<MezContent Include="assets\resources.resx" />
</ItemGroup>
<Target Name="BuildMez" AfterTargets="Build" Inputs="@(MezContent)" Outputs="$(MezOutputPath)">
<RemoveDir Directories="$(MezIntermediatePath)" />
<Copy SourceFiles="@(MezContent)" DestinationFolder="$(MezIntermediatePath)" />
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
<ZipDirectory SourceDirectory="$(MezIntermediatePath)" DestinationFile="$(MezOutputPath)"
Overwrite="true" />
</Target>
<Target Name="CopyToConnectors" AfterTargets="BuildMez">
<Message
Text="Copying .mez file to: $(UserProfile)\Documents\Power BI Desktop\Custom Connectors"
Importance="High" />
<MakeDir Directories="$(UserProfile)\Documents\Power BI Desktop\Custom Connectors\" />
<Copy SourceFiles="$(MezOutputPath)"
DestinationFolder="$(UserProfile)\Documents\Power BI Desktop\Custom Connectors\" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(MezIntermediatePath)" />
<Delete Files="$(MezOutputPath)" />
</Target>
DefaultTargets="BuildMez">
<PropertyGroup>
<Version Condition="'$(Version)' == ''">2.0.0-wip</Version>
<OutputPath Condition="'$(OutputPath)' == ''">$(MSBuildProjectDirectory)\bin\</OutputPath>
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">
$(MSBuildProjectDirectory)\obj\</IntermediateOutputPath>
<MezIntermediatePath>$(IntermediateOutputPath)MEZ\</MezIntermediatePath>
<MezOutputPath>$(OutputPath)$(MsBuildProjectName).mez</MezOutputPath>
<IsContinuousIntegrationBuild>false</IsContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<MezContent Include="Speckle.pq" />
<MezContent Include="utilities\**\*.pqm" />
<MezContent Include="speckle\**\*.pqm" />
<MezContent Include="assets\SpeckleLogo16.png" />
<MezContent Include="assets\SpeckleLogo20.png" />
<MezContent Include="assets\SpeckleLogo24.png" />
<MezContent Include="assets\SpeckleLogo32.png" />
<MezContent Include="assets\SpeckleLogo40.png" />
<MezContent Include="assets\SpeckleLogo48.png" />
<MezContent Include="assets\SpeckleLogo64.png" />
<MezContent Include="assets\SpeckleLogo80.png" />
<MezContent Include="assets\resources.resx" />
</ItemGroup>
<Target Name="BuildMez" AfterTargets="Build" Inputs="@(MezContent)" Outputs="$(MezOutputPath)">
<RemoveDir Directories="$(MezIntermediatePath)" />
<Copy SourceFiles="@(MezContent)" DestinationFolder="$(MezIntermediatePath)" />
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
<ZipDirectory SourceDirectory="$(MezIntermediatePath)" DestinationFile="$(MezOutputPath)"
Overwrite="true" />
</Target>
<Target Name="CopyToConnectors" AfterTargets="BuildMez"
Condition="$(IsContinuousIntegrationBuild) == 'false'">
<Message
Text="Copying .mez file to: $(UserProfile)\Documents\Power BI Desktop\Custom Connectors"
Importance="High" />
<MakeDir Directories="$(UserProfile)\Documents\Power BI Desktop\Custom Connectors\" />
<Copy SourceFiles="$(MezOutputPath)"
DestinationFolder="$(UserProfile)\Documents\Power BI Desktop\Custom Connectors\" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(MezIntermediatePath)" />
<Delete Files="$(MezOutputPath)" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/powerbi-data-connector/tests/api/api.fetch.test.pq
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Use this file to write queries to test your data connector
let result = Speckle.Api.Fetch("https://latest.speckle.dev") in Record.ToTable(result)
let result = Speckle.Api.Fetch("https://latest.speckle.systems") in Record.ToTable(result)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Use this file to write queries to test your data connector
let
result = Speckle.Api.REST.GetObject(
"https://latest.speckle.dev", "5f284e5c70", "85e5f250fe591ea74d8d5dc1137a9341"
"https://latest.speckle.systems", "5f284e5c70", "85e5f250fe591ea74d8d5dc1137a9341"
)
in
result
2 changes: 1 addition & 1 deletion src/powerbi-data-connector/tests/get.byurl.test.pq
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Use this file to write queries to test your data connector
let result = Speckle.Get.ByUrl("https://latest.speckle.dev/streams/3d25474a18") in Record.ToTable(result)
let result = Speckle.Get.ByUrl("https://latest.speckle.systems/streams/3d25474a18") in Record.ToTable(result)
2 changes: 1 addition & 1 deletion src/powerbi-data-connector/tests/getbyurl.test.pq
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Use this file to write queries to test your data connector
let result = Speckle.GetByUrl("https://latest.speckle.dev/streams/5f284e5c70/objects/85e5f250fe591ea74d8d5dc1137a9341") in result
let result = Speckle.GetByUrl("https://latest.speckle.systems/streams/5f284e5c70/objects/85e5f250fe591ea74d8d5dc1137a9341") in result
2 changes: 2 additions & 0 deletions src/powerbi-visual/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@
"essential": true,
"name": "WebAccess",
"parameters": [
"https://app.speckle.systems",
"https://speckle.xyz",
"https://*.speckle.xyz",
"https://latest.speckle.systems",
"https://latest.speckle.dev",
"https://*.speckle.dev",
"https://analytics.speckle.systems",
Expand Down
Loading

0 comments on commit 1bf6e76

Please sign in to comment.