tellytv / telly

An IPTV proxy
MIT License
750 stars 105 forks source link

Modernize golang dev environment #249

Closed tmm1 closed 5 years ago

tmm1 commented 5 years ago

This replaces dep with go mod (aka vgo) which is built into golang 1.11 onwards.

The main advantage here is that it is much easier to get up and going for development and/or personal builds:

$ git clone https://github.com/tellytv/telly -b dev
$ cd telly
$ make

You don't have to worry about GOPATH anymore or worry about installing dep somehow first. Just clone the repo wherever you prefer and run make (or just run go build .)

Also fixes a test regression from #245

The circle CI changes are untested since CI appears to be disabled on this repo.

fixes #226

robbiet480 commented 5 years ago

@tmm1 I believe Circle is only broken on master branch. Dev is currently passing.

tmm1 commented 5 years ago

@tmm1 I believe Circle is only broken on master branch. Dev is currently passing.

Ah, okay great. I was confused because the PR doesn't show the CI results in the checks area.

iMiMx commented 4 years ago

Seems to fail for me, unfortunately:

root@media:~# git clone https://github.com/tellytv/telly -b dev
Cloning into 'telly'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 2380 (delta 6), reused 0 (delta 0), pack-reused 2364
Receiving objects: 100% (2380/2380), 28.89 MiB | 20.92 MiB/s, done.
Resolving deltas: 100% (1318/1318), done.
root@media:~# cd telly/
root@media:~/telly# make
>> formatting code
a_main-packr.go
>> building binaries
 >   telly
# github.com/tellytv/telly
../go/src/github.com/tellytv/telly/lineup.go:371:36: undefined: schedulesdirect.ProgramArtwork
../go/src/github.com/tellytv/telly/lineup.go:572:122: undefined: schedulesdirect.ProgramArtwork
!! command failed: build -o /root/telly/telly -ldflags -X github.com/prometheus/common/version.Version=1.1.0.6 -X github.com/prometheus/common/version.Revision=9eb5e99c7f01614e28be49d4fc1e18a043d91821 -X github.com/prometheus/common/version.Branch=dev -X github.com/prometheus/common/version.BuildUser=root@media -X github.com/prometheus/common/version.BuildDate=20200111-17:58:44  -extldflags '-static' -a -tags netgo github.com/tellytv/telly: exit status 2
Makefile:38: recipe for target 'build' failed
make: *** [build] Error 1

Am trying to hack the options that are passed to ffmpeg, to test something.

EDIT: Updated go to the latest, apologies.