forked from git-ecosystem/git-credential-manager
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dba839c
commit daa9d20
Showing
5 changed files
with
98 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Inputs | ||
param ([Parameter(Mandatory)] $CONFIGURATION) | ||
|
||
# Directories | ||
$THISDIR = $pwd.path | ||
$ROOT = (Get-Item $THISDIR).parent.parent.parent.FullName | ||
$SRC = "$ROOT/src" | ||
$OUT = "$ROOT/out" | ||
$GCM_SRC = "$SRC/shared/Git-Credential-Manager" | ||
$DOTNET_TOOL = "shared/DotnetTool" | ||
$PROJ_OUT = "$OUT/$DOTNET_TOOL" | ||
$FRAMEWORK = "net7.0" | ||
|
||
# Outputs | ||
$OUTDIR = "$PROJ_OUT/nupkg/$CONFIGURATION" | ||
$IMGOUT = "$OUTDIR/images" | ||
$PAYLOAD = "$OUTDIR/payload" | ||
$SYMBOLOUT = "$OUTDIR/payload.sym" | ||
|
||
# Clean up any old payload and symbols directories | ||
if (Test-Path -Path $OUTDIR) | ||
{ | ||
Write-Output "Cleaning old payload directory '$OUTDIR'..." | ||
Remove-Item -Recurse "$OUTDIR" -Force | ||
} | ||
|
||
# Ensure payload and symbol directories exist | ||
mkdir -p "$IMGOUT","$PAYLOAD","$SYMBOLOUT" | ||
|
||
# Set DOTNET_ROOT if needed | ||
$DOTNET_SET = Get-Item "Env:DOTNET_ROOT" -ErrorAction SilentlyContinue | ||
if (!$DOTNET_SET) { | ||
$Env:DOTNET_ROOT = (Get-Command dotnet).Parent | Split-Path -Parent | ||
} | ||
|
||
# Publish core application executables | ||
Write-Output "Publishing core application..." | ||
& $env:DOTNET_ROOT publish "$GCM_SRC" ` | ||
--configuration="$CONFIGURATION" ` | ||
--framework="$FRAMEWORK" ` | ||
--output="$PAYLOAD" ` | ||
-p:UseAppHost=false | ||
|
||
# Collect symbols | ||
Write-Output "Collecting managed symbols..." | ||
Copy-Item -Path "$PAYLOAD/*.pdb" -Destination "$SYMBOLOUT" | ||
|
||
# Copy DotnetToolSettings.xml file | ||
Write-Output "Copying out package configuration files..." | ||
Copy-Item -Path "$SRC/$DOTNET_TOOL/DotnetToolSettings.xml" -Destination "$PAYLOAD/" | ||
|
||
# Copy package icon image | ||
Write-Output "Copying images..." | ||
Copy-Item -Path "$SRC/$DOTNET_TOOL/icon.png" -Destination "$IMGOUT" | ||
|
||
Write-Output "Layout complete." |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Inputs | ||
param ([Parameter(Mandatory)] $CONFIGURATION, [Parameter(Mandatory)] $VERSION, $PUBLISH_DIR) | ||
|
||
# Directories | ||
$THISDIR = $pwd.path | ||
$ROOT = (Get-Item $THISDIR).parent.parent.parent.FullName | ||
$SRC = "$ROOT/src" | ||
$OUT = "$ROOT/out" | ||
$DOTNET_TOOL = "shared/DotnetTool" | ||
|
||
if ([string]::IsNullOrEmpty($PUBLISH_DIR)) { | ||
$PUBLISH_DIR = "$OUT/$DOTNET_TOOL/nupkg/$CONFIGURATION" | ||
} | ||
|
||
# Set DOTNET_ROOT if needed | ||
$DOTNET_SET = Get-Item "Env:DOTNET_ROOT" -ErrorAction SilentlyContinue | ||
if (!$DOTNET_SET) { | ||
$Env:DOTNET_ROOT = (Get-Command dotnet).Parent | Split-Path -Parent | ||
} | ||
|
||
Write-Output "Creating dotnet tool package..." | ||
& "$env:DOTNET_ROOT\dotnet.exe" pack "$SRC/$DOTNET_TOOL/DotnetTool.csproj" ` | ||
/p:Configuration="$CONFIGURATION" ` | ||
/p:PackageVersion="$VERSION" ` | ||
/p:PublishDir="$PUBLISH_DIR/" | ||
|
||
Write-Output "Dotnet tool pack complete." |
This file was deleted.
Oops, something went wrong.