Bot should update properly now. Credentials shouldn't be replaced by updates.
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| #define sysfolder "system" | ||||
| #define version GetEnv('NADEKOBOT_INSTALL_VERSION') | ||||
| #define version GetEnv("NADEKOBOT_INSTALL_VERSION") | ||||
| #define target "win7-x64" | ||||
|  | ||||
| [Setup] | ||||
| @@ -20,14 +20,14 @@ DisableWelcomePage=no | ||||
|  | ||||
| [Files] | ||||
| ;install  | ||||
| Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist ignoreversion createallsubdirs; Excludes: "*.pdb, *.db" | ||||
| Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist ignoreversion createallsubdirs; Excludes: "*.pdb, *.db" | ||||
| ;rename credentials example to credentials, but don't overwrite if it exists | ||||
| Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\credentials_example.json"; DestName: "credentials.json"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: skipifsourcedoesntexist onlyifdoesntexist; | ||||
| ;Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\credentials_example.json"; DestName: "credentials.json"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: skipifsourcedoesntexist onlyifdoesntexist; | ||||
|  | ||||
| ;reinstall - i want to copy all files, but i don't want to overwrite any data files because users will lose their customization if they don't have a backup,  | ||||
| ;            and i don't want them to have to backup and then copy-merge into data folder themselves, or lose their currency images due to overwrite. | ||||
| Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json"; | ||||
| Source: "src\NadekoBot\bin\Release\PublishOutput\{#target}\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs; | ||||
| Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json"; | ||||
| Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs; | ||||
|  | ||||
| ;readme    | ||||
| ;Source: "readme"; DestDir: "{app}"; Flags: isreadme | ||||
| @@ -84,3 +84,17 @@ begin | ||||
|     end | ||||
|   end; | ||||
| end; | ||||
|  | ||||
| function GetFileName(const AFileName: string): string; | ||||
| begin | ||||
|   Result := ExpandConstant('{app}\{#sysfolder}\' + AFileName); | ||||
| end; | ||||
|  | ||||
| procedure CurStepChanged(CurStep: TSetupStep); | ||||
| begin | ||||
|   if (CurStep = ssInstall) then | ||||
|   begin | ||||
|     if FileExists(GetFileName('credentials_example.json')) and not FileExists(GetFileName('credentials.json')) then | ||||
|       RenameFile(GetFileName('credentials_example.json'), GetFileName('credentials.json')); | ||||
|   end; | ||||
| end; | ||||
							
								
								
									
										12
									
								
								release.ps1
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								release.ps1
									
									
									
									
									
								
							| @@ -15,12 +15,17 @@ function GitHub-Release($versionNumber) | ||||
|     $changelog = [string]::join([Environment]::NewLine, $changelog) | ||||
|  | ||||
|     $cl2 = $clArr | where { "$_" -like "*Merge pull request*" } | ||||
|     $cl2 = [string]::join([Environment]::NewLine, $cl2) | ||||
|  | ||||
|     $changelog = "## Changes$nl$changelog$nl ## Pull Requests Merged$nl$cl2" | ||||
|     $changelog = "## Changes$nl$changelog" | ||||
|     if ($cl2 -ne $null) | ||||
|     { | ||||
|       $cl2 = [string]::join([Environment]::NewLine, $cl2) | ||||
|       $changelog = $changelog + "$nl ## Pull Requests Merged$nl$cl2" | ||||
|     } | ||||
|  | ||||
|     Write-Host $changelog  | ||||
|  | ||||
|     dotnet publish -c Release --runtime win7-x64 | ||||
|  | ||||
|     # set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"  | ||||
|     # $source = "src\NadekoBot\bin\Release\PublishOutput\win7-x64"  | ||||
|     # $target = "src\NadekoBot\bin\Release\PublishOutput\NadekoBot.7z" | ||||
| @@ -54,6 +59,7 @@ function GitHub-Release($versionNumber) | ||||
|     $result = Invoke-RestMethod @uploadParams | ||||
|     Write-Host 'Artifact upload finished.' | ||||
|     $result = GitHubMake-Release $versionNumber $commitId $FALSE $gitHubApiKey $auth "$releaseId" | ||||
|     git pull | ||||
|     Write-Host 'Done 🎉' | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -17,7 +17,7 @@ namespace NadekoBot.Services.Impl | ||||
|         private readonly IBotCredentials _creds; | ||||
|         private readonly DateTime _started; | ||||
|  | ||||
|         public const string BotVersion = "1.41.1"; | ||||
|         public const string BotVersion = "1.41.2"; | ||||
|  | ||||
|         public string Author => "Kwoth#2560"; | ||||
|         public string Library => "Discord.Net"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user