forked from Nyanotrasen/Nyanotrasen
-
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.
Merge remote-tracking branch 'upstream/master' into master-ru
- Loading branch information
Showing
3,268 changed files
with
1,642,067 additions
and
1,808,662 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: "publish" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -40,24 +41,24 @@ jobs: | |
mv release/*.zip "release/${{ github.sha }}" | ||
- name: Upload files to cdn | ||
uses: appleboy/scp-action@master | ||
uses: marcodallasanta/ssh-scp-[email protected] | ||
with: | ||
host: nyanotrasen.moe | ||
username: boywife-ralsei | ||
key: ${{ secrets.BUILDS_PUSH_KEY }} | ||
port: ${{ secrets.PUBLISH_SSH_PORT }} | ||
source: "release/${{ github.sha }}" | ||
target: "/var/www/builds.nyanotrasen.moe/nyanotrasen/builds/" | ||
strip_components: 1 | ||
host: ${{ secrets.PUBLISH_HOST }} | ||
port: ${{ secrets.PUBLISH_PORT }} | ||
user: ${{ secrets.PUBLISH_PUSH_USER }} | ||
key: ${{ secrets.PUBLISH_PUSH_KEY }} | ||
scp_options: -r -o StrictHostKeyChecking=no | ||
local: "release/${{ github.sha }}" | ||
remote: "builds" | ||
|
||
- name: Update manifest JSON | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: nyanotrasen.moe | ||
username: boywife-ralsei | ||
key: ${{ secrets.BUILDS_PUSH_KEY }} | ||
port: ${{ secrets.PUBLISH_SSH_PORT }} | ||
script: /var/www/builds.nyanotrasen.moe/manifest.py -c nyanotrasen -v ${{ github.sha }} | ||
host: ${{ secrets.PUBLISH_HOST }} | ||
username: ${{ secrets.PUBLISH_NOTIFY_USER }} | ||
key: ${{ secrets.PUBLISH_NOTIFY_KEY }} | ||
port: ${{ secrets.PUBLISH_PORT }} | ||
script: /home/${{ secrets.PUBLISH_PUSH_USER }}/push.s1 ${{ github.sha }} | ||
|
||
- name: Publish changelog | ||
run: Tools/actions_changelogs_since_last_run.py | ||
|
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,3 @@ | ||
{ | ||
"omnisharp.analyzeOpenDocumentsOnly": true | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System.IO; | ||
using Content.Shared.Administration; | ||
using Content.Shared.CCVar; | ||
using Robust.Shared.Configuration; | ||
using Robust.Shared.Console; | ||
using Robust.Shared.ContentPack; | ||
using Robust.Shared.Network; | ||
using Robust.Shared.Utility; | ||
|
||
namespace Content.Client.Administration.Commands; | ||
|
||
public sealed class UploadFolder : IConsoleCommand | ||
{ | ||
public string Command => "uploadfolder"; | ||
public string Description => Loc.GetString("uploadfolder-command-description"); | ||
public string Help => Loc.GetString("uploadfolder-command-help"); | ||
|
||
private static readonly ResPath BaseUploadFolderPath = new("/UploadFolder"); | ||
|
||
[Dependency] private IResourceManager _resourceManager = default!; | ||
[Dependency] private IConfigurationManager _configManager = default!; | ||
|
||
public async void Execute(IConsoleShell shell, string argStr, string[] args) | ||
{ | ||
var fileCount = 0; | ||
|
||
|
||
if (!_configManager.GetCVar(CCVars.ResourceUploadingEnabled)) | ||
{ | ||
shell.WriteError( Loc.GetString("uploadfolder-command-resource-upload-disabled")); | ||
return; | ||
} | ||
|
||
if (args.Length != 1) | ||
{ | ||
shell.WriteError( Loc.GetString("uploadfolder-command-wrong-args")); | ||
shell.WriteLine( Loc.GetString("uploadfolder-command-help")); | ||
return; | ||
} | ||
var folderPath = new ResPath(BaseUploadFolderPath + $"/{args[0]}"); | ||
|
||
if (!_resourceManager.UserData.Exists(folderPath.ToRootedPath())) | ||
{ | ||
shell.WriteError( Loc.GetString("uploadfolder-command-folder-not-found",("folder", folderPath))); | ||
return; // bomb out if the folder doesnt exist in /UploadFolder | ||
} | ||
|
||
//Grab all files in specified folder and upload them | ||
foreach (var filepath in _resourceManager.UserData.Find($"{folderPath.ToRelativePath()}/").files ) | ||
{ | ||
|
||
await using var filestream = _resourceManager.UserData.Open(filepath,FileMode.Open); | ||
{ | ||
var sizeLimit = _configManager.GetCVar(CCVars.ResourceUploadingLimitMb); | ||
if (sizeLimit > 0f && filestream.Length * SharedNetworkResourceManager.BytesToMegabytes > sizeLimit) | ||
{ | ||
shell.WriteError( Loc.GetString("uploadfolder-command-file-too-big", ("filename",filepath), ("sizeLimit",sizeLimit))); | ||
return; | ||
} | ||
|
||
var data = filestream.CopyToArray(); | ||
|
||
var netManager = IoCManager.Resolve<INetManager>(); | ||
var msg = netManager.CreateNetMessage<NetworkResourceUploadMessage>(); | ||
|
||
msg.RelativePath = new ResPath($"{filepath.ToString().Remove(0,14)}"); //removes /UploadFolder/ from path | ||
msg.Data = data; | ||
|
||
netManager.ClientSendMessage(msg); | ||
fileCount++; | ||
} | ||
} | ||
|
||
shell.WriteLine( Loc.GetString("uploadfolder-command-success",("fileCount",fileCount))); | ||
} | ||
} |
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
Oops, something went wrong.