forked from ClassIsland/ClassIsland
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
48 additions
and
39 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
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ Import-Module ./tools/release-gen/alist-utils.psm1 | |
|
||
# Generate metadata & upload artifacts | ||
Write-Output "Generating metadata & uploading artifacts" | ||
Copy-Item ./out_signed/* -Destination ./out/ -Recurse -Force | ||
Copy-Item ./out_artifacts/* -Destination ./out/ -Recurse -Force | ||
|
||
$version = $(git describe --abbrev=0 --tags) | ||
$gitCommitId = $(git rev-parse HEAD) | ||
|
@@ -59,13 +59,13 @@ foreach ($artifact in $artifacts){ | |
$downloadInfo = @{ | ||
"DeployMethod" = $deployMethodId | ||
"ArchiveDownloadUrls" = @{ | ||
"main" = "https://get.classisland.tech/p/ClassIsland-Ningbo-S3/classisland/disturb/${version}/$($artifact.Name)" | ||
"github-origin" = "https://github.com/ClassIsland/ClassIsland/releases/download/${version}/$($artifact.Name)" | ||
"main" = "https://get.classisland.tech/p/ClassIsland-Ningbo-S3/classisland/disturb-net6/${version}/$($artifact.Name)" | ||
"github-origin" = "https://github.com/ClassIsland/ClassIsland-net6/releases/download/${version}/$($artifact.Name)" | ||
} | ||
"ArchiveSHA256"= $(Get-FileHash $artifact -Algorithm SHA256).Hash | ||
} | ||
Write-Output "Uploading artifact $artifactId" | ||
UploadFile $artifact.FullName "ClassIsland-Ningbo-S3/classisland/disturb/${version}/" | ||
UploadFile $artifact.FullName "ClassIsland-Ningbo-S3/classisland/disturb-net6/${version}/" | ||
$versionInfo.DownloadInfos[$artifactId] = $downloadInfo | ||
$hashSummary += "| $($artifact.Name) | ``$($downloadInfo.ArchiveSHA256)`` |`n" | ||
$legaceyMD5Hashes.Add($artifact.Name, (Get-FileHash $artifact -Algorithm MD5).Hash) | ||
|
@@ -94,21 +94,21 @@ git config --global user.email '[email protected]' | |
git clone git@github.com:ClassIsland/metadata.git | ||
cd metadata | ||
|
||
git checkout -b metadata/disturb/$version | ||
if ($(Test-Path ./metadata/disturb/$version) -eq $false) { | ||
mkdir ./metadata/disturb/$version | ||
git checkout -b metadata/disturb-net6/$version | ||
if ($(Test-Path ./metadata/disturb-net6/$version) -eq $false) { | ||
mkdir ./metadata/disturb-net6/$version | ||
} | ||
Copy-Item ../out/index.json -Destination ./metadata/disturb/$version/index.json -Force | ||
$globalIndex = ConvertFrom-Json (Get-Content ./metadata/disturb/index.json -Raw) | ||
Copy-Item ../out/index.json -Destination ./metadata/disturb-net6/$version/index.json -Force | ||
$globalIndex = ConvertFrom-Json (Get-Content ./metadata/disturb-net6/index.json -Raw) | ||
$globalIndex.Versions = [System.Collections.ArrayList]@($globalIndex.Versions) | ||
$globalIndex.Versions.Add(@{ | ||
Version = $version | ||
Title = $version | ||
Channels = $tagInfo.Channels | ||
VersionInfoUrl = "https://get.classisland.tech/p/ClassIsland-Ningbo-S3/classisland/disturb/${version}/index.json" | ||
}) | ||
ConvertTo-Json $globalIndex -Depth 99 | Out-File ./metadata/disturb/index.json | ||
ConvertTo-Json $globalIndex -Depth 99 | Out-File ./metadata/disturb-net6/index.json | ||
git add . | ||
git commit -m "metadata(disturb): release $version at https://github.com/ClassIsland/ClassIsland/commit/$gitCommitId" | ||
git push origin metadata/disturb/$version | ||
gh pr create -R ClassIsland/metadata -t "Add metadata for $version" -b "Add metadata for $version at https://github.com/ClassIsland/ClassIsland/commit/$gitCommitId" -B main -a HelloWRC | ||
git push origin metadata/disturb-net6/$version | ||
gh pr create -R ClassIsland/metadata -t "Add metadata for $version" -b "Add metadata for $version at https://github.com/ClassIsland/ClassIsland-net6/commit/$gitCommitId" -B main -a HelloWRC |