diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 6bf9c0285..e097eac71 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#sshpass -p $FTP_PASSWORD ssh -o StrictHostKeyChecking=no $FTP_USER@$FTP_HOST:$FTP_DIR 'rm -rf !(appsettings.json)' +#purge target directory: rm -rf !(appsettings.json) sshpass -p $FTP_PASSWORD scp -o StrictHostKeyChecking=no -r /home/travis/build/collinbarrett/FilterLists/data/ $FTP_USER@$FTP_HOST:$FTP_DIR chmod 777 /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Agent/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/FilterLists.Agent sshpass -p $FTP_PASSWORD scp -o StrictHostKeyChecking=no -r /home/travis/build/collinbarrett/FilterLists/src/FilterLists.Agent/bin/Release/netcoreapp2.0/ubuntu.16.04-x64/publish/* $FTP_USER@$FTP_HOST:$FTP_DIR diff --git a/src/FilterLists.Services/SnapshotService/SnapshotDe.cs b/src/FilterLists.Services/SnapshotService/SnapshotDe.cs index 80353949f..bacb4e70b 100644 --- a/src/FilterLists.Services/SnapshotService/SnapshotDe.cs +++ b/src/FilterLists.Services/SnapshotService/SnapshotDe.cs @@ -58,7 +58,7 @@ private async Task TryGetContent() } catch (WebException we) { - snapshot.HttpStatusCode = ((HttpWebResponse)we.Response).StatusCode.ToString(); + snapshot.HttpStatusCode = ((int)((HttpWebResponse)we.Response).StatusCode).ToString(); return null; } catch (HttpRequestException) @@ -73,7 +73,7 @@ private async Task GetContent() using (var httpClient = new HttpClient()) using (var httpResponseMessage = await httpClient.GetAsync(list.ViewUrl)) { - snapshot.HttpStatusCode = httpResponseMessage.StatusCode.ToString(); + snapshot.HttpStatusCode = ((int)httpResponseMessage.StatusCode).ToString(); if (httpResponseMessage.IsSuccessStatusCode) return await httpResponseMessage.Content.ReadAsStringAsync(); }