Skip to content

Commit

Permalink
[chore] Upgrade to Go 1.14 (#39)
Browse files Browse the repository at this point in the history
* server: upgrade go to 1.13. fix dependencies. fix sql init scripts for settings.

* ci: update github workflow for go build.

* ci: update travis and github workflow build for go.

* web: npm audit fix.

* chore: upgrade to go 1.14.
  • Loading branch information
alfg authored Jun 8, 2020
1 parent cdd6dce commit b52af8a
Show file tree
Hide file tree
Showing 9 changed files with 2,398 additions and 2,103 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.12
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
version: 1.12
go-version: 1.14
id: go

- name: Check out code into the Go module directory
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ language: go
go:
- "1.11"
- "1.12"
- "1.13"
- "1.14"
- tip
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12-alpine AS builder
FROM golang:1.14-alpine AS builder

# Create the user and group files that will be used in the running container to
# run the process as an unprivileged user.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/alfg/openencoder

go 1.12
go 1.14

require (
github.com/appleboy/gin-jwt/v2 v2.6.2
github.com/aws/aws-sdk-go v1.20.15
github.com/digitalocean/godo v1.19.0
github.com/gin-gonic/gin v1.4.0
github.com/gin-gonic/gin v1.6.3
github.com/gocraft/work v0.5.1
github.com/gomodule/redigo v2.0.0+incompatible
github.com/jmoiron/sqlx v1.2.0
Expand Down
46 changes: 37 additions & 9 deletions go.sum

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions scripts/20_settings_options.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (1, 'S3_ACCESS_KEY', 'S3 Access Key', 'S3 Access Key', true);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (4, 'SLACK_WEBHOOK', 'Slack Webhook for notifications', 'Slack Webhook', true);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (3, 'DIGITAL_OCEAN_ACCESS_TOKEN', 'Digital Ocean Access Token (Required for Machines)', 'Digital Ocean Access Token', true);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (2, 'S3_SECRET_KEY', 'S3 Secret Key', 'S3 Secret Key', true);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (6, 'S3_INBOUND_BUCKET', 'S3 Inbound Bucket', 'S3 Inbound Bucket', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (8, 'S3_OUTBOUND_BUCKET', 'S3 Outbound Bucket', 'S3 Outbound Bucket', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (9, 'S3_OUTBOUND_BUCKET_REGION', 'S3 Outbound Bucket Region', 'S3 Outbound Bucket Region', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (7, 'S3_INBOUND_BUCKET_REGION', 'S3 Inbound Bucket Region', 'S3 Inbound Bucket Region', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (10, 'S3_PROVIDER', 'S3 Provider', 'S3 Provider', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (11, 'S3_STREAMING', 'Enable this setting to enable streaming directly to FFmpeg from a pre-signed S3 URL, instead of downloading the file first if disk space is a concern. Please note this setting can impact performance.', 'Stream Encode from S3', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (3, 'DIGITAL_OCEAN_ACCESS_TOKEN', 'Digital Ocean Access Token (Required for Machines)', 'Digital Ocean Access Token', true);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (4, 'SLACK_WEBHOOK', 'Slack Webhook for notifications', 'Slack Webhook', true);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (5, 'S3_INBOUND_BUCKET', 'S3 Inbound Bucket', 'S3 Inbound Bucket', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (6, 'S3_OUTBOUND_BUCKET', 'S3 Outbound Bucket', 'S3 Outbound Bucket', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (7, 'S3_OUTBOUND_BUCKET_REGION', 'S3 Outbound Bucket Region', 'S3 Outbound Bucket Region', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (8, 'S3_INBOUND_BUCKET_REGION', 'S3 Inbound Bucket Region', 'S3 Inbound Bucket Region', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (9, 'S3_PROVIDER', 'S3 Provider', 'S3 Provider', false);
INSERT INTO public.settings_option (id, name, description, title, secure) VALUES (10, 'S3_STREAMING', 'Enable this setting to enable streaming directly to FFmpeg from a pre-signed S3 URL, instead of downloading the file first if disk space is a concern. Please note this setting can impact performance.', 'Stream Encode from S3', false);

SELECT setval('settings_option_id_seq', max(id)) FROM settings_option;
14 changes: 8 additions & 6 deletions scripts/21_settings_defaults.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (1, 'digitalocean', 10, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (4, 'sfo2', 7, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (5, 'outbound', 8, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (8, 'inbound', 6, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (9, 'sfo2', 9, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (10, 'disabled', 11, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (1, 'digitalocean', 9, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (2, 'sfo2', 8, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (3, 'outbound', 6, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (4, 'inbound', 5, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (5, 'sfo2', 7, false);
INSERT INTO public.settings (id, value, settings_option_id, encrypted) VALUES (6, 'disabled', 10, false);

SELECT setval('settings_id_seq', max(id)) FROM settings;
Loading

0 comments on commit b52af8a

Please sign in to comment.