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 sysfolder "system" | ||||||
| #define version GetEnv('NADEKOBOT_INSTALL_VERSION') | #define version GetEnv("NADEKOBOT_INSTALL_VERSION") | ||||||
| #define target "win7-x64" | #define target "win7-x64" | ||||||
|  |  | ||||||
| [Setup] | [Setup] | ||||||
| @@ -20,14 +20,14 @@ DisableWelcomePage=no | |||||||
|  |  | ||||||
| [Files] | [Files] | ||||||
| ;install  | ;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 | ;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,  | ;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. | ;            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\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\PublishOutput\{#target}\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs; | Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs; | ||||||
|  |  | ||||||
| ;readme    | ;readme    | ||||||
| ;Source: "readme"; DestDir: "{app}"; Flags: isreadme | ;Source: "readme"; DestDir: "{app}"; Flags: isreadme | ||||||
| @@ -83,4 +83,18 @@ begin | |||||||
|       MsgBox(X + '\{#sysfolder}\data\NadekoBot.db doesn''t exist', mbConfirmation, MB_YESNO) |       MsgBox(X + '\{#sysfolder}\data\NadekoBot.db doesn''t exist', mbConfirmation, MB_YESNO) | ||||||
|     end |     end | ||||||
|   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; | end; | ||||||
							
								
								
									
										12
									
								
								release.ps1
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								release.ps1
									
									
									
									
									
								
							| @@ -15,12 +15,17 @@ function GitHub-Release($versionNumber) | |||||||
|     $changelog = [string]::join([Environment]::NewLine, $changelog) |     $changelog = [string]::join([Environment]::NewLine, $changelog) | ||||||
|  |  | ||||||
|     $cl2 = $clArr | where { "$_" -like "*Merge pull request*" } |     $cl2 = $clArr | where { "$_" -like "*Merge pull request*" } | ||||||
|     $cl2 = [string]::join([Environment]::NewLine, $cl2) |     $changelog = "## Changes$nl$changelog" | ||||||
|  |     if ($cl2 -ne $null) | ||||||
|     $changelog = "## Changes$nl$changelog$nl ## Pull Requests Merged$nl$cl2" |     { | ||||||
|  |       $cl2 = [string]::join([Environment]::NewLine, $cl2) | ||||||
|  |       $changelog = $changelog + "$nl ## Pull Requests Merged$nl$cl2" | ||||||
|  |     } | ||||||
|  |  | ||||||
|     Write-Host $changelog  |     Write-Host $changelog  | ||||||
|  |  | ||||||
|  |     dotnet publish -c Release --runtime win7-x64 | ||||||
|  |  | ||||||
|     # set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"  |     # set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"  | ||||||
|     # $source = "src\NadekoBot\bin\Release\PublishOutput\win7-x64"  |     # $source = "src\NadekoBot\bin\Release\PublishOutput\win7-x64"  | ||||||
|     # $target = "src\NadekoBot\bin\Release\PublishOutput\NadekoBot.7z" |     # $target = "src\NadekoBot\bin\Release\PublishOutput\NadekoBot.7z" | ||||||
| @@ -54,6 +59,7 @@ function GitHub-Release($versionNumber) | |||||||
|     $result = Invoke-RestMethod @uploadParams |     $result = Invoke-RestMethod @uploadParams | ||||||
|     Write-Host 'Artifact upload finished.' |     Write-Host 'Artifact upload finished.' | ||||||
|     $result = GitHubMake-Release $versionNumber $commitId $FALSE $gitHubApiKey $auth "$releaseId" |     $result = GitHubMake-Release $versionNumber $commitId $FALSE $gitHubApiKey $auth "$releaseId" | ||||||
|  |     git pull | ||||||
|     Write-Host 'Done 🎉' |     Write-Host 'Done 🎉' | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ namespace NadekoBot.Services.Impl | |||||||
|         private readonly IBotCredentials _creds; |         private readonly IBotCredentials _creds; | ||||||
|         private readonly DateTime _started; |         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 Author => "Kwoth#2560"; | ||||||
|         public string Library => "Discord.Net"; |         public string Library => "Discord.Net"; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user