mirror of
				https://github.com/mxpv/podsync.git
				synced 2024-05-11 05:55:04 +00:00 
			
		
		
		
	Add GoReleaser configuration
This commit is contained in:
		
							
								
								
									
										53
									
								
								.goreleaser.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								.goreleaser.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | ||||
| project_name: "Podsync" | ||||
|  | ||||
| before: | ||||
|   hooks: | ||||
|     - go mod tidy | ||||
|  | ||||
| builds: | ||||
|   - main: ./cmd/podsync/ | ||||
|     binary: podsync | ||||
|     env: | ||||
|       - CGO_ENABLED=0 | ||||
|     goos: | ||||
|       - linux | ||||
|       - darwin | ||||
|       - windows | ||||
|     goarch: | ||||
|       - 386 | ||||
|       - amd64 | ||||
|  | ||||
| dockers: | ||||
|   - image_templates: | ||||
|     - '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 | ||||
|  | ||||
| archives: | ||||
| - replacements: | ||||
|     darwin: Darwin | ||||
|     linux: Linux | ||||
|     windows: Windows | ||||
|     386: i386 | ||||
|     amd64: x86_64 | ||||
|  | ||||
| checksum: | ||||
|   name_template: 'checksums.txt' | ||||
|  | ||||
| snapshot: | ||||
|   name_template: "{{ .Tag }}-next" | ||||
|  | ||||
| changelog: | ||||
|   sort: asc | ||||
|   filters: | ||||
|     exclude: | ||||
|     - '^docs:' | ||||
|     - '^test:' | ||||
|     - Merge pull request | ||||
|     - Merge branch | ||||
| @@ -1,13 +1,8 @@ | ||||
| FROM golang:1.12 as build | ||||
| WORKDIR /work | ||||
| COPY . . | ||||
| RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 make build | ||||
|  | ||||
| FROM alpine:3.10 | ||||
| RUN apk --no-cache add \ | ||||
|     ca-certificates \ | ||||
|     youtube-dl \ | ||||
|     ffmpeg | ||||
| WORKDIR /app/ | ||||
| COPY --from=build /work/podsync /app/podsync | ||||
| COPY podsync /app/podsync | ||||
| ENTRYPOINT ["/app/podsync"] | ||||
|   | ||||
							
								
								
									
										31
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								README.md
									
									
									
									
									
								
							| @@ -10,31 +10,14 @@ Podsync - is a simple, free service that lets you listen to any YouTube / Vimeo | ||||
|  | ||||
| Podcast applications have a rich functionality for content delivery - automatic download of new episodes, remembering last played position, sync between devices and offline listening. This functionality is not available on YouTube and Vimeo. So the aim of Podsync is to make your life easier and enable you to view/listen to content on any device in podcast client. | ||||
|  | ||||
| ## Architecture | ||||
| ## How to release | ||||
|  | ||||
|  | ||||
|  | ||||
| ## Building Docker images | ||||
|  | ||||
| Every project contains a `Makefile` for building and pushing to a registry: | ||||
|  | ||||
| ```bash | ||||
| make build | ||||
| make push | ||||
| make update | ||||
| - Add and push version tag | ||||
|   ``` | ||||
|  | ||||
| Use docker-compose to run containers: | ||||
|  | ||||
| ```bash | ||||
| docker-compose pull | ||||
| docker-compose up -d | ||||
|   $ git tag -a v0.1.0 -m "First release" | ||||
|   $ git push origin v0.1.0 | ||||
|   ``` | ||||
|  | ||||
| ## Building frontend | ||||
| Node.js and npm are required in order to build the frontend: | ||||
| ```bash | ||||
| brew install node | ||||
| make static | ||||
| ls -la dist/ | ||||
| - Run GoReleaser at the root of your repository: | ||||
|   ``` | ||||
|   $ goreleaser --rm-dist | ||||
|   ``` | ||||
|   | ||||
| @@ -32,6 +32,12 @@ const banner = ` | ||||
| |/       (_______)(______/ \_______)   \_/   |/    )_)(_______/ | ||||
| ` | ||||
|  | ||||
| var ( | ||||
| 	version = "dev" | ||||
| 	commit  = "none" | ||||
| 	date    = "unknown" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
| 	log.SetFormatter(&log.TextFormatter{ | ||||
| 		TimestampFormat: time.RFC3339, | ||||
| @@ -61,6 +67,12 @@ func main() { | ||||
| 		log.Info(banner) | ||||
| 	} | ||||
|  | ||||
| 	log.WithFields(log.Fields{ | ||||
| 		"version": version, | ||||
| 		"commit":  commit, | ||||
| 		"date":    date, | ||||
| 	}).Info("running podsync") | ||||
|  | ||||
| 	// Load TOML file | ||||
| 	log.Debugf("loading configuration %q", opts.ConfigPath) | ||||
| 	cfg, err := config.LoadConfig(opts.ConfigPath) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user