diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 159e27f..cab509d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,9 +7,11 @@ on: jobs: pre-build: + name: Update version in source code runs-on: windows-latest env: NEW_VERSION: '${{ github.ref_name }}' + MANIFEST_FILE_PATH: "JfrogVSExtension/source.extension.vsixmanifest" steps: - name: Config Github @@ -34,6 +36,8 @@ jobs: - name: Commit and push changes run: | + git config --local user.name "${{ github.actor }}" + git config --local user.email "${{ github.actor }}@users.noreply.github.com" git add . git commit -m "Updated VSIX version to ${{ env.NEW_VERSION }}" git push diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a45270c..a3c561f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: Build and Run Tests on: push: pull_request: - type: [ labeled ] + type: [ labeled ] jobs: call-build-workflow: @@ -37,4 +37,3 @@ jobs: # run tests in release mode with logs presentation - name: Run MSTest Project run: dotnet test --no-build --configuration Release --logger "console;verbosity=detailed" ./UnitTestJfrogVSExtension/bin/Release/UnitTestJfrogVSExtension.dll - diff --git a/JFrogVSExtension/Resources/DownloadJfrogCli.ps1 b/JFrogVSExtension/Resources/DownloadJfrogCli.ps1 deleted file mode 100644 index 376b652..0000000 --- a/JFrogVSExtension/Resources/DownloadJfrogCli.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -# Check if the JFROG_CLI_VERSION environment variable is set, if not using latest version -if ($env:JFROG_CLI_VERSION) { - Write-Output "Downloading Jfrog CLI version: $env:JFROG_CLI_VERSION" -} else { - Write-Error "Error: JFROG_CLI_VERSION environment variable is not set." - exit 1 -} - -# Define the URL for the JFrog CLI executable -$jfrogCliUrl = "https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/$($env:JFROG_CLI_VERSION)/jfrog-cli-windows-amd64/jf.exe" - -# Define the destination path for the downloaded file -$destinationPath = Join-Path (Get-Location).Path "JFrogVSExtension/Resources/jfrog.exe" - -# Download the JFrog CLI executable -Invoke-WebRequest -Uri $jfrogCliUrl -OutFile $destinationPath -Verbose - - -# Verify the file was downloaded successfully -if (Test-Path -Path $destinationPath) { - Write-Output "JFrog CLI v$env:JFROG_CLI_VERSION successfully downloaded to: $destinationPath" - $downloadedVersion = & $destinationPath --version - - if ($downloadedVersion -eq "jf version $env:JFROG_CLI_VERSION"){ - Write-Output "Successfully downloaded Jfrog CLI version $env:JFROG_CLI_VERSION." - } else { - Write-Error "Version does not match the environment variable. Expected: $env:JFROG_CLI_VERSION, Got: $downloadedVersion" - exit 1 - } - -} else { - Write-Error "Failed to download JFrog CLI to: $destinationPath" -} diff --git a/UnitTestJfrogVSExtension/UnitTest1.cs b/UnitTestJfrogVSExtension/UnitTest1.cs deleted file mode 100644 index bde9a6f..0000000 --- a/UnitTestJfrogVSExtension/UnitTest1.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Diagnostics; - -namespace UnitTestJfrogVSExtension -{ - [TestClass] - public class UnitTest1 - { - public TestContext TestContext { get; set; } - - [TestMethod] - public void TestMethod1() - { - TestContext.WriteLine("Success!!!"); - } - } -}