Skip to content

Commit

Permalink
Unzip SLOOP Binary (#5278)
Browse files Browse the repository at this point in the history
Fixes #5262
  • Loading branch information
ugras-ergun-sonarsource committed Apr 3, 2024
1 parent f625c82 commit 86cb8cb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/DownloadDependencies/CommonProperties.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
</PropertyGroup>

<PropertyGroup>
<SloopBinaryFileName>sonarlint-backend-cli-$(EmbeddedSloopVersion)-windows_x64.zip</SloopBinaryFileName>
<SloopBinaryFileNameWithoutExtension>sonarlint-backend-cli-$(EmbeddedSloopVersion)-windows_x64</SloopBinaryFileNameWithoutExtension>
<SloopBinaryFileName>$(SloopBinaryFileNameWithoutExtension).zip</SloopBinaryFileName>
<SloopBinaryDownloadDir>$(LOCALAPPDATA)\SLVS_Build_Sloop</SloopBinaryDownloadDir>
<SloopExtractDir>$(SloopBinaryDownloadDir)\$(SloopBinaryFileNameWithoutExtension)</SloopExtractDir>
<SloopBinaryDownloadPath>$(SloopBinaryDownloadDir)\$(SloopBinaryFileName)</SloopBinaryDownloadPath>
<SloopBinaryRemoteUrl>https://repox.jfrog.io/artifactory/sonarsource/org/sonarsource/sonarlint/core/sonarlint-backend-cli/$(EmbeddedSloopVersion)/$(SloopBinaryFileName)</SloopBinaryRemoteUrl>
</PropertyGroup>
Expand Down
5 changes: 5 additions & 0 deletions build/DownloadDependencies/JarProcessing.targets
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<CallTarget Targets="ExtractJsonFromJars" />
<CallTarget Targets="ExtractRuleDescFromJson" />
<CallTarget Targets="DownloadSloop" />
<CallTarget Targets="UnzipSloop" />
<CallTarget Targets="WriteOutputFile" />
</Target>

Expand All @@ -53,6 +54,10 @@
<Exec Command="curl -u$(ARTIFACTORY_USER):$(ARTIFACTORY_PASSWORD) --ssl-no-revoke -C - --create-dirs --output $(SloopBinaryDownloadPath) --url $(SloopBinaryRemoteUrl)" />
</Target>

<Target Name="UnzipSloop">
<Unzip SourceFiles="$(SloopBinaryDownloadPath)" DestinationFolder="$(SloopExtractDir)" OverwriteReadOnlyFiles="true" />
</Target>

<Target Name="ExtractJsonFromJars">
<Message Importance="high" Text="[ProcessJarFiles] Removing existing json files ..." />
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions pipeline/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ jobs:

- task: VSBuild@1
displayName: Pre-process jar files
env:
ARTIFACTORY_USER: $(ARTIFACTORY_PRIVATE_READER_USERNAME)
ARTIFACTORY_PASSWORD: $(ARTIFACTORY_PRIVATE_READER_ACCESS_TOKEN)
inputs:
solution: build\DownloadDependencies\DownloadDependencies.proj
vsVersion: 17.0
Expand Down

0 comments on commit 86cb8cb

Please sign in to comment.