Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CacheManagement
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CacheManagement
Commits
772e86dd
Commit
772e86dd
authored
Mar 27, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add NuGet scripts.
parent
9b0ad4e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
0 deletions
+63
-0
common.ps1
nupkg/common.ps1
+18
-0
pack.ps1
nupkg/pack.ps1
+31
-0
push_packages.ps1
nupkg/push_packages.ps1
+14
-0
No files found.
nupkg/common.ps1
0 → 100644
View file @
772e86dd
# Paths
$packFolder
=
(
Get-Item
-Path
"./"
-Verbose
)
.FullName
$rootFolder
=
Join-Path
$packFolder
"../"
# List of projects
$projects
=
(
"src/EasyAbp.CacheManagement.Application"
,
"src/EasyAbp.CacheManagement.Application.Contracts"
,
"src/EasyAbp.CacheManagement.Domain"
,
"src/EasyAbp.CacheManagement.Domain.Shared"
,
"src/EasyAbp.CacheManagement.EntityFrameworkCore"
,
"src/EasyAbp.CacheManagement.HttpApi"
,
"src/EasyAbp.CacheManagement.HttpApi.Client"
,
"src/EasyAbp.CacheManagement.MongoDB"
,
"src/EasyAbp.CacheManagement.Web"
,
"driver/EasyAbp.CacheManagement.StackExchangeRedis"
)
\ No newline at end of file
nupkg/pack.ps1
0 → 100644
View file @
772e86dd
.
".\common.ps1"
# Rebuild solution
Set-Location
$rootFolder
& dotnet restore
# Create all packages
foreach
(
$project
in
$projects
)
{
$projectFolder
=
Join-Path
$rootFolder
$project
# Create nuget pack
Set-Location
$projectFolder
Remove-Item
-Recurse
(
Join-Path
$projectFolder
"bin/Release"
)
& dotnet build -c Release
& dotnet pack -c Release
if
(
-Not
$?
)
{
Write-Host
(
"Packaging failed for the project: "
+
$projectFolder
)
exit
$LASTEXITCODE
}
# Copy nuget package
$projectName
=
$project
.Substring
(
$project
.LastIndexOf
(
"/"
)
+ 1
)
$projectPackPath
=
Join-Path
$projectFolder
(
"/bin/Release/"
+
$projectName
+
".*.nupkg"
)
Move-Item
$projectPackPath
$packFolder
}
# Go back to the pack folder
Set-Location
$packFolder
\ No newline at end of file
nupkg/push_packages.ps1
0 → 100644
View file @
772e86dd
.
".\common.ps1"
# Get the version
[
xml]
$commonPropsXml
=
Get-Content
(
Join-Path
$rootFolder
"common.props"
)
$version
=
$commonPropsXml
.Project.PropertyGroup.Version
# Publish all packages
foreach
(
$project
in
$projects
)
{
$projectName
=
$project
.Substring
(
$project
.LastIndexOf
(
"/"
)
+ 1
)
& dotnet nuget push
(
$projectName
+
"."
+
$version
+
".nupkg"
)
-s https://api.nuget.org/v3/index.json
}
# Go back to the pack folder
Set-Location
$packFolder
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment