CommunityBot/BuildRun: Difference between revisions Discussion View history

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Stop Bot ==
== Restart Bot ==
 
$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl restart communitybot-discord
communitybot-discord: stopped
communitybot-discord: started
$ sudo supervisorctl status communitybot-discord
communitybot-discord            RUNNING  pid 32690, uptime 0:00:27
 
== Update Bot ==
 
=== Stop Bot ===


  $ whoami
  $ whoami
Line 7: Line 19:
  communitybot-discord            STOPPED  Sep 26 07:32 PM
  communitybot-discord            STOPPED  Sep 26 07:32 PM


== Download New Code ==
=== Download New Code ===


  $ sudo su communitybot
  $ sudo su communitybot
Line 32: Line 44:
  create mode 100644 src/WazeBotDiscord/Scripts/ScriptsService.cs
  create mode 100644 src/WazeBotDiscord/Scripts/ScriptsService.cs


== Build New Release Code ==
=== Build New Release Code ===
  $ cd src/WazeBotDiscord
  $ cd src/WazeBotDiscord
  $ pwd
  $ pwd
Line 45: Line 57:
   Time Elapsed 00:00:02.66
   Time Elapsed 00:00:02.66


== Publish New Release Code ==
=== Publish New Release Code ===


<code>publish</code> creates a standalone directory where the build can be run from
<code>publish</code> creates a standalone directory where the build can be run from
Line 55: Line 67:
   WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/
   WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/


== Start Bot ==
=== Start Bot ===


  $ exit
  $ exit

Latest revision as of 15:12, 10 October 2017

Restart Bot

$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl restart communitybot-discord
communitybot-discord: stopped
communitybot-discord: started
$ sudo supervisorctl status communitybot-discord
communitybot-discord             RUNNING   pid 32690, uptime 0:00:27

Update Bot

Stop Bot

$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl stop communitybot-discord
$ sudo supervisorctl status communitybot-discord
communitybot-discord             STOPPED   Sep 26 07:32 PM

Download New Code

$ sudo su communitybot
$ whoami
communitybot
$ cd ~/CommunityBot
$ pwd
/home/communitybot/CommunityBot
$ git pull
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 5), reused 5 (delta 0)
Unpacking objects: 100% (10/10), done.
From gitlab.com:SixbucksSolutions/CommunityBot
  4319f99..fea7bf8  master     -> origin/master
Updating 4319f99..fea7bf8
Fast-forward
 src/WazeBotDiscord/Modules/ReloadModule.cs   |   5 ++-
 src/WazeBotDiscord/Modules/ScriptsModule.cs  |  85 +++++++++++++++++++++++++++++++++++++++
 src/WazeBotDiscord/Program.cs                |   6 ++-
 src/WazeBotDiscord/Scripts/ScriptsService.cs | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 241 insertions(+), 2 deletions(-)
create mode 100644 src/WazeBotDiscord/Modules/ScriptsModule.cs
create mode 100644 src/WazeBotDiscord/Scripts/ScriptsService.cs

Build New Release Code

$ cd src/WazeBotDiscord
$ pwd
/home/communitybot/CommunityBot/src/WazeBotDiscord
$ dotnet build -c Release
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll
Build succeeded.
   0 Warning(s)
   0 Error(s)
 Time Elapsed 00:00:02.66

Publish New Release Code

publish creates a standalone directory where the build can be run from

$ dotnet publish -c Release
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core 
Copyright (C) Microsoft Corporation. All rights reserved.
 WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/WazeBotDiscord.dll
 WazeBotDiscord -> /home/communitybot/CommunityBot/src/WazeBotDiscord/bin/Release/netcoreapp2.0/publish/

Start Bot

$ exit
$ whoami
[your user account with sudo privileges]
$ sudo supervisorctl start communitybot-discord
$ sudo supervisorctl status communitybot-discord
communitybot-discord             RUNNING   pid 24621, uptime 0:00:04