1
00:00:01,020 --> 00:00:07,170
So the last thing I want to do is to actually write an update scripts so that when I want to push a

2
00:00:07,170 --> 00:00:12,870
new version of my application to the server, that everything works the way that it should, that it

3
00:00:12,870 --> 00:00:18,570
does it in one command, that it pulls from get that it runs any migration's if they exist and that

4
00:00:18,570 --> 00:00:23,000
finally it it stops and starts the application.

5
00:00:23,730 --> 00:00:24,810
So let's do that.

6
00:00:24,840 --> 00:00:25,730
It's pretty straightforward.

7
00:00:25,740 --> 00:00:32,610
Let's go to our website Khedive, our WW w actually I got to connect to the server first, so let's

8
00:00:32,610 --> 00:00:33,250
try that again.

9
00:00:34,200 --> 00:00:34,830
There we are.

10
00:00:37,170 --> 00:00:45,150
OK Verd w w w w book and I'm in the right spot and I will create a new file.

11
00:00:45,540 --> 00:00:51,150
Vij update dot S.H. and I'm going to end it with Dot S.H. and I recommend that you do as well because

12
00:00:51,150 --> 00:00:59,340
it's a shell script and Shell scripts begin with a hash bang, a no sign and an exclamation mark and

13
00:00:59,340 --> 00:01:03,660
then bingo bash telling it that we're going to use the bash script.

14
00:01:04,110 --> 00:01:07,290
And what I want to do, first of all, is pull from yet.

15
00:01:07,290 --> 00:01:10,740
So I should just write git pull and that's one command.

16
00:01:11,280 --> 00:01:18,870
And once that happens, I want to run the migration's so I can run sota migrate and that will run migration's.

17
00:01:18,870 --> 00:01:21,150
If there are no migration's it'll just print and empty.

18
00:01:21,150 --> 00:01:21,870
Nothing happened.

19
00:01:22,470 --> 00:01:27,240
And then finally we need to recompile our application so we can write.

20
00:01:28,680 --> 00:01:38,580
Go build Dasch old and we're going to build out to the file bookings with two O's and we're going to

21
00:01:39,720 --> 00:01:54,330
compile from CMD Web Stargirl and once that's finished we want to run pseudo supervisor l stop book

22
00:01:55,050 --> 00:01:59,580
and pseudo supervisor CTL Start book.

23
00:02:00,330 --> 00:02:02,910
And that should be all we have to do for this part.

24
00:02:03,240 --> 00:02:04,530
So let's save and quit that.

25
00:02:04,860 --> 00:02:06,750
Now I need to make this executable.

26
00:02:06,750 --> 00:02:13,590
So I'll write Modise 777 update dot S.H. and let's try running it.

27
00:02:15,720 --> 00:02:16,230
Update.

28
00:02:20,320 --> 00:02:26,500
It asked me for my pseudo password, I'll type that in stops, it starts again and we're good.

29
00:02:27,220 --> 00:02:31,200
So it checked to see with get everything was up to date so there was nothing to happen there.

30
00:02:31,330 --> 00:02:32,440
And then it ran.

31
00:02:32,440 --> 00:02:37,570
So migration's and it gave me that warning file, which I could ignore because it doesn't matter and

32
00:02:37,570 --> 00:02:38,740
there are no migration's.

33
00:02:38,740 --> 00:02:42,410
But then it started and stopped the application and that's literally all I have to do.

34
00:02:42,700 --> 00:02:48,010
So when I pushed things to get and I'm ready to deploy them to the server, all I have to do is to log

35
00:02:48,010 --> 00:02:51,190
into the server, go to this directory and run the update script.

36
00:02:51,430 --> 00:02:54,910
And that keeps things nice and clean and very, very simple.
