Skip to content

Commit

Permalink
Allow building and installing fluent-plugin-google-cloud from an arbi…
Browse files Browse the repository at this point in the history
…trary branch on Windows. (#348)
  • Loading branch information
igorpeshansky committed Aug 5, 2021
1 parent 3fb9343 commit d8d1952
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion windows-installer/generate_sdl_agent_exe.ps1
Expand Up @@ -13,7 +13,10 @@
# ARGUMENTS
##############################

Param([string]$version = (Get-Content "$PSScriptRoot\..\windows-installer\VERSION"))
Param(
[string]$version = (Get-Content "$PSScriptRoot\..\windows-installer\VERSION"),
[string]$localOutputGemDir
)

##############################
# TRACING AND ERROR HANDLING
Expand All @@ -28,6 +31,8 @@ $ErrorActionPreference = 'Stop'

# Just install into current directory for simplicity.
$BASE_INSTALLER_DIR = [string](Get-Location)
# Re-enable tracing.
Set-PSDebug -Trace 1

# The path of where ruby and all gems will be. This is the portion that will be
# packaged and zipped up.
Expand Down Expand Up @@ -111,6 +116,8 @@ $ProgressPreference = "silentlyContinue"
Invoke-WebRequest "$RUBY_INSTALLER_LINK" -OutFile "$RUBY_INSTALLER" -UserAgent "curl/7.60.0"
Invoke-WebRequest "$NSIS_INSTALLER_LINK" -OutFile "$NSIS_INSTALLER" -UserAgent "curl/7.60.0"
Invoke-WebRequest "$NSIS_UNZU_INSTALLER_LINK" -OutFile "$NSIS_UNZU_ZIP" -UserAgent "curl/7.60.0"
# Re-enable tracing.
Set-PSDebug -Trace 1


##############################
Expand Down Expand Up @@ -157,6 +164,15 @@ $plugin_gems_rb = $SRC_ROOT + '\plugin_gems.rb'
& $RUBY_EXE $gem_installer $core_gems_rb
& $RUBY_EXE $gem_installer $plugin_gems_rb


if ($localOutputGemDir -ne $null) {
Push-Location $localOutputGemDir
Get-ChildItem
& $GEM_CMD build fluent-plugin-google-cloud.gemspec
& $GEM_CMD install fluent-plugin-google-cloud*.gem --no-document
Pop-Location
}

##############################
# STEP 4.1 - TEMPORARY HACK TO UPDATE RUBY FILE
##############################
Expand Down

0 comments on commit d8d1952

Please sign in to comment.