Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update from origin #1

Merged
merged 8 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ linters:
- errcheck

run:
deadline: 3m
skip-dirs:
- bin
- docs
- docs
5 changes: 1 addition & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ dockers:
- 'mxpv/podsync:{{ .Tag }}'
- 'mxpv/podsync:v{{ .Major }}.{{ .Minor }}'
- 'mxpv/podsync:latest'
- 'docker.pkg.github.com/mxpv/podsync/cli:{{ .Tag }}'
- 'docker.pkg.github.com/mxpv/podsync/cli:v{{ .Major }}.{{ .Minor }}'
- 'docker.pkg.github.com/mxpv/podsync/cli:latest'
binaries:
- podsync
dockerfile: Dockerfile
Expand Down Expand Up @@ -55,4 +52,4 @@ changelog:
- '^docs:'
- '^test:'
- Merge pull request
- Merge branch
- Merge branch
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3.10

WORKDIR /app/
RUN wget -O /usr/bin/youtube-dl https://github.com/ytdl-org/youtube-dl/releases/download/2019.11.05/youtube-dl && \
RUN wget -O /usr/bin/youtube-dl https://github.com/ytdl-org/youtube-dl/releases/download/2020.01.24/youtube-dl && \
chmod +x /usr/bin/youtube-dl && \
apk --no-cache add ca-certificates python ffmpeg
COPY podsync /app/podsync
Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,20 @@ docker:
#
# Run goreleaser to build and upload release binaries
#
V =
.PHONY: release
release:
test -n "$(V)" # Version is required
- git tag --delete v$(V)
git tag v$(V)
goreleaser --rm-dist
git push origin --tags

#
# Pull GolangCI-Lint dependency
#
$(GOLANGCI):
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(BINPATH) v1.17.1
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(BINPATH) v1.23.1
$(GOLANGCI) --version

#
Expand All @@ -47,3 +52,10 @@ lint: $(GOLANGCI)
.PHONY: test
test:
go test -v ./...

#
# Clean
#
.PHONY: clean
clean:
- rm -rf $(BINPATH)
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ brew install youtube-dl ffmpeg

In order to query YouTube or Vimeo API you have to obtain an API token first.

- [How to get YouTube API key](https://elfsight.com/help/how-to-get-youtube-api-key/)
- [How to get YouTube API key](https://elfsight.com/blog/2016/12/how-to-get-youtube-api-key-tutorial/)
- [Generate an access token for Vimeo](https://developer.vimeo.com/api/guides/start#generate-access-token)

## Configuration example
Expand Down Expand Up @@ -101,12 +101,7 @@ $ docker-compose up

## How to make a release

- Add and push version tag
Just run:
```
$ git tag -a v0.1.0 -m "First release"
$ git push origin --tags
```
- Run GoReleaser at the root of your repository:
```
$ make release
$ make release V=2.0.7
```
4 changes: 2 additions & 2 deletions pkg/feed/youtube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestYT_BuildFeed(t *testing.T) {
urls := []string{
"https://youtube.com/user/fxigr1",
"https://www.youtube.com/channel/UCupvZG-5ko_eiXAupbDfxWw",
"https://www.youtube.com/playlist?list=PLfVk3KMh3VX1yJShGRsJmsqAjvMIviJYQ",
"https://www.youtube.com/playlist?list=PLF7tUDhGkiCk_Ne30zu7SJ9gZF9R9ZruE",
"https://www.youtube.com/channel/UCK9lZ2lHRBgx2LOcqPifukA",
"https://youtube.com/user/WylsaLive",
"https://www.youtube.com/playlist?list=PLUVl5pafUrBydT_gsCjRGeCy0hFHloec8",
Expand Down Expand Up @@ -86,7 +86,7 @@ func TestYT_GetVideoCount(t *testing.T) {
feeds := []*link.Info{
{Provider: link.ProviderYoutube, LinkType: link.TypeUser, ItemID: "fxigr1"},
{Provider: link.ProviderYoutube, LinkType: link.TypeChannel, ItemID: "UCupvZG-5ko_eiXAupbDfxWw"},
{Provider: link.ProviderYoutube, LinkType: link.TypePlaylist, ItemID: "PLfVk3KMh3VX1yJShGRsJmsqAjvMIviJYQ"},
{Provider: link.ProviderYoutube, LinkType: link.TypePlaylist, ItemID: "PLF7tUDhGkiCk_Ne30zu7SJ9gZF9R9ZruE"},
{Provider: link.ProviderYoutube, LinkType: link.TypeChannel, ItemID: "UCK9lZ2lHRBgx2LOcqPifukA"},
{Provider: link.ProviderYoutube, LinkType: link.TypeUser, ItemID: "WylsaLive"},
{Provider: link.ProviderYoutube, LinkType: link.TypePlaylist, ItemID: "PLUVl5pafUrBydT_gsCjRGeCy0hFHloec8"},
Expand Down