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

Updates #375

Merged
merged 6 commits into from
Jan 17, 2024
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
30 changes: 7 additions & 23 deletions .github/workflows/codetests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
os: [ubuntu, macos, windows]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-go@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: go-generate
Expand All @@ -30,8 +30,8 @@ jobs:
env:
GOOS: ${{ matrix.os }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-go@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: go-generate
Expand All @@ -51,29 +51,13 @@ jobs:
env:
GOOS: ${{ matrix.os }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-go@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: go-generate
run: GOOS=linux go generate ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: 'v1.54'

homebrew-test:
# description: "Installs dependencis on macOS and runs `make install` to mimic a homebrew install."
name: test-homebrew-install
runs-on: macos-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: go-generate
run: go generate ./...
- name: make-install
run: |
TMP=$(mktemp -d)
make install VERSION=0.0.1 ITERATION=240 PREFIX=$TMP ETC=$TMP/etc
version: 'v1.54'
36 changes: 11 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
name: Make macOS DMG
runs-on: macos-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
# we need the whole thing so we can count commits.
fetch-depth: '0'
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: go-generate
Expand All @@ -39,7 +39,7 @@ jobs:
brew install mitchellh/gon/gon jq
make signdmg
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dmg-release
path: release
Expand All @@ -54,11 +54,11 @@ jobs:
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
# we need the whole thing so we can count commits.
fetch-depth: '0'
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: make-release
Expand All @@ -70,7 +70,7 @@ jobs:
make release
source settings.sh ; echo "version=${VERSION}-${ITERATION}" >> $GITHUB_OUTPUT
- name: upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release
path: release
Expand All @@ -88,7 +88,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Download files: ${{ matrix.files }}"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ matrix.files }}
- name: Upload files to unstable.golift.io
Expand All @@ -109,7 +109,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download release files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: release
- uses: golift/upload-packagecloud@v1
Expand All @@ -128,7 +128,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download release files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: release
- uses: golift/upload-packagecloud@v1
Expand All @@ -152,7 +152,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download ${{ matrix.files }} Files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ matrix.files }}
- name: Publish ${{ matrix.files }} artifacts to github
Expand All @@ -173,24 +173,10 @@ jobs:
name: Deploy ArchLinux AUR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: '0'
- name: Deploy Arch AUR
run: bash init/archlinux/aur-deploy.sh
env:
DEPLOY_KEY: ${{ secrets.AUR_DEPLOY_KEY }}

homebrew-formula:
# description: creates and uploads a homebrew formula file to the golift/homebrew-mugs repo.
needs: deploy-github-release
name: Deploy Homebrew Formula
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: '0'
- name: Deploy Homebrew Formula
run: bash init/homebrew/formula-deploy.sh
env:
DEPLOY_KEY: ${{ secrets.HOMEBREW_DEPLOY_KEY }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2018-2022 David Newhall II
Copyright (c) 2023-2023 Go Lift - Building Strong Go Tools
Copyright (c) 2023-2024 Go Lift - Building Strong Go Tools

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -347,24 +347,4 @@ pkg/bindata/bindata.go: pkg/bindata/files/*
##################

docker:
init/docker/makedocker.sh

####################
##### Homebrew #####
####################

# Used for Homebrew only. Other distros can create packages.
install: man readme unpackerr
@echo - Done Building -
@echo - Local installation with the Makefile is only supported on macOS.
@echo - Otherwise, build and install a package: make rpm -or- make deb
@[ "$(shell uname)" = "Darwin" ] || (echo "Unable to continue, not a Mac." && false)
@[ "$(PREFIX)" != "" ] || (echo "Unable to continue, PREFIX not set. Use: make install PREFIX=/usr/local ETC=/usr/local/etc" && false)
@[ "$(ETC)" != "" ] || (echo "Unable to continue, ETC not set. Use: make install PREFIX=/usr/local ETC=/usr/local/etc" && false)
# Copying the binary, config file, unit file, and man page into the env.
/usr/bin/install -m 0755 -d $(PREFIX)/bin $(PREFIX)/share/man/man1 $(ETC)/unpackerr $(PREFIX)/share/doc/unpackerr $(PREFIX)/lib/unpackerr
/usr/bin/install -m 0755 -cp unpackerr $(PREFIX)/bin/unpackerr
/usr/bin/install -m 0644 -cp unpackerr.1.gz $(PREFIX)/share/man/man1
/usr/bin/install -m 0644 -cp examples/unpackerr.conf.example $(ETC)/unpackerr/
[ -f $(ETC)/unpackerr/unpackerr.conf ] || /usr/bin/install -m 0644 -cp examples/unpackerr.conf.example $(ETC)/unpackerr/unpackerr.conf
/usr/bin/install -m 0644 -cp LICENSE *.html examples/* $(PREFIX)/share/doc/unpackerr/
init/docker/makedocker.sh
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ documentation support. This project succeeds because of them. Thank you!
[![packagecloud](https://docs.golift.io/integrations/packagecloud.png "PackageCloud.io")](https://packagecloud.io)
[![GitHub](https://docs.golift.io/integrations/octocat.png "GitHub")](https://GitHub.com)
[![Docker Cloud](https://docs.golift.io/integrations/docker.png "Docker Cloud")](https://cloud.docker.com)
[![Homebrew](https://docs.golift.io/integrations/homebrew.png "Homebrew")](https://brew.sh)
[![Go Lift](https://docs.golift.io/integrations/golift.png "Go Lift")](https://golift.io)
[![CloudFlare](https://docs.golift.io/integrations/cloudflare.png "CloudFlare")](https://cloudflare.com)

Expand All @@ -44,4 +43,4 @@ Yes, please. Just make a pull request and lets chat about it in the PR or on Dis

## License

[MIT](https://github.com/Unpackerr/unpackerr/blob/main/LICENSE)
[MIT](https://unpackerr.zip/docs/unpackerr/license)
2 changes: 1 addition & 1 deletion examples/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OPTIONS
-p, --prefix <env prefix>
This argument allows changing the environment variable prefix.
This application parses environment variables into config data.
The default prefix is UN, making env variables like UN_SONARR_URL.
The default prefix is UN, making env variables like UN_SONARR_0_URL.

-w, --webhook <1,2,3,4,5,6,7,8>
This sends a webhook of the type specified then exits. This is only
Expand Down
67 changes: 37 additions & 30 deletions examples/unpackerr.conf.example
Original file line number Diff line number Diff line change
@@ -1,57 +1,59 @@
## Unpackerr Example Configuration File ##
## The following values are application defaults. ##
## Environment Variables may override all values. ##
## More configuration help: https://unpackerr.zip ##
####################################################

# [true/false] Turn on debug messages in the output. Do not wrap this in quotes.
# Recommend trying this so you know what it looks like. I personally leave it on.
## [true/false] Turn on debug messages in the output. Do not wrap this in quotes.
## Recommend trying this so you know what it looks like. I personally leave it on.
debug = false

# Disable writing messages to stdout/stderr. This silences the app. Set a log
# file below if you set this to true. Recommended when starting with systemctl.
## Disable writing messages to stdout/stderr. This silences the app. Set a log
## file below if you set this to true. Recommended when starting with systemctl.
quiet = false

# Send error output to stderr instead of stdout by setting error_stderr to true.
# Recommend leaving this at false. Ignored if quiet (above) is true.
## Send error output to stderr instead of stdout by setting error_stderr to true.
## Recommend leaving this at false. Ignored if quiet (above) is true.
error_stderr = false

# Setting activity to true will silence all app queue log lines with only zeros.
# Set this to true when you want less log spam.
## Setting activity to true will silence all app queue log lines with only zeros.
## Set this to true when you want less log spam.
activity = false

# The application queue data is logged on an interval. Adjust that interval with this setting.
# Default is a minute. 2m, 5m, 10m, 30m, 1h are also perfectly acceptable.
## The Starr-application activity queue is logged on an interval.
## Adjust that interval with this setting.
## Default is a minute. 2m, 5m, 10m, 30m, 1h are also perfectly acceptable.
log_queues = "1m"

# Write messages to a log file. This is the same data that is normally output to stdout.
# This setting is great for Docker users that want to export their logs to a file.
# The alternative is to use syslog to log the output of the application to a file.
# Default is no log file; this is unset. log_files=0 turns off auto-rotation.
# Default files is 10 and size(mb) is 10 Megabytes; both doubled if debug is true.
## Write messages to a log file. This is the same data that is normally output to stdout.
## This setting is great for Docker users that want to export their logs to a file.
## The alternative is to use syslog to log the output of the application to a file.
## Default is no log file; this is unset. log_files=0 turns off auto-rotation.
## Default files is 10 and size(mb) is 10 Megabytes; both doubled if debug is true.
#log_file = '/downloads/unpackerr.log'
log_files = 10
log_file_mb = 10

# How often to poll sonarr and radarr.
# Recommend 1m-5m. Uses Go Duration.
## How often to poll sonarr and radarr.
## Recommend 1m-5m. Uses Go Duration.
interval = "2m"

# How long an item must be queued (download complete) before extraction will start.
# One minute is the historic default and works well. Set higher if your downloads
# take longer to finalize (or transfer locally). Uses Go Duration.
## How long an item must be queued (download complete) before extraction will start.
## One minute is the historic default and works well. Set higher if your downloads
## take longer to finalize (or transfer locally). Uses Go Duration.
start_delay = "1m"

# How long to wait before removing the history for a failed extraction.
# Once the history is deleted the item will be recognized as new and
# extraction will start again. Uses Go Duration.
## How long to wait before removing the history for a failed extraction.
## Once the history is deleted the item will be recognized as new and
## extraction will start again. Uses Go Duration.
retry_delay = "5m"

# How many files may be extracted in parallel. 1 works fine.
# Do not wrap the number in quotes. Raise this only if you have fast disks and CPU.
## How many files may be extracted in parallel. 1 works fine.
## Do not wrap the number in quotes. Raise this only if you have fast disks and CPU.
parallel = 1

# Use these configurations to control the file modes used for newly extracted
# files and folders. Recommend 0644/0755 or 0666/0777.
## Use these configurations to control the file modes used for newly extracted
## files and folders. Recommend 0644/0755 or 0666/0777.
file_mode = "0644"
dir_mode = "0755"

Expand All @@ -77,10 +79,10 @@ dir_mode = "0755"

##-Notes-#######-READ THIS!!!-##################################################
## The following sections can be repeated if you have more than one Sonarr, ##
## Radarr or Lidarr, Readarr, Folder, Webhook, or Command Hook. ##
## Radarr, Lidarr, Readarr, Whisparr, Folder, Webhook, or Command Hook. ##
## You MUST uncomment the [[header]] and api_key at a minimum for Starr apps. ##
## ALL LINES BEGINNING WITH A HASH # ARE IGNORED ##
## REMOVE THE HASH # FROM CONFIG LINES YOU WANT TO CHANGE ##
## ALL LINES BEGINNING WITH A HASH # ARE IGNORED COMMENTS ##
## REMOVE THE HASH # FROM CONFIG LINES YOU WANT TO CHANGE ##
################################################################################

#[[sonarr]]
Expand Down Expand Up @@ -156,6 +158,11 @@ dir_mode = "0755"
# syncthing = false


#[[whisparr]]
# url = "http://127.0.0.1:6969"
# api_key = "0123456789abcdef0123456789abc"
## Whisparr shares the same settings as the other starr apps.

##################################################################################
### ### STOP HERE ### STOP HERE ### STOP HERE ### STOP HERE #### STOP HERE ### #
### Only using Starr apps? The things above. The below configs are OPTIONAL. ### #
Expand Down
Loading
Loading