Comments (15)
Included in brew now :)
from autorestic.
Found some docs here:
https://docs.brew.sh/Adding-Software-to-Homebrew#writing-the-formula
I've never packaged any software but if you don't have a Mac I could give it a try?
For reference here is the formula for restic on homebrew-core:
https://github.com/Homebrew/homebrew-core/blob/7beae5ab57c65249403699b2b0700fbccf14e6cb/Formula/restic.rb
from autorestic.
class Autorestic < Formula
desc "High level CLI utility for restic"
homepage "https://autorestic.vercel.app/"
url "https://github.com/cupcakearmy/autorestic/archive/v1.0.8.tar.gz"
# sha256 "cb3b6614aa4ca7f56192a9d9cfbd46acd8abdad2338cf2f3e2496a859d78f905"
license "Apache-2.0"
head "https://github.com/cupcakearmy/autorestic.git"
depends_on "go" => :build
depends_on "restic"
def install
ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache"
system "go", "build", "-o", "autorestic", "./main.go"
mkdir "completions"
system "bash", "-c", "./autorestic completion bash > completions/autorestic_bash"
system "bash", "-c", "./autorestic completion zsh > completions/autorestic_zsh"
system "bash", "-c", "./autorestic completion fish > completions/autorestic_fish"
bash_completion.install "completions/autorestic_bash"
zsh_completion.install "completions/autorestic_zsh"
fish_completion.install "completions/autorestic_fish"
bin.install "autorestic"
end
test do
end
end
This works, now I just have to sign the tarball
from autorestic.
You the boss😃
from autorestic.
Any suggestions / help is welcomed
from autorestic.
Ye just read the same docs. I develop mainly on MacOS but I don't have a lot of time the next week, so if you would either draft or even release the Brew version I would be very grateful. Otherwise I'll do it whenever I find time 🙂
from autorestic.
I've done some experimenting and so far I've encountered two warnings:
No checksum was provided for this resource.
Probably just need to start adding a SHA256 checksum at each release to that Homebrew doesn't warn.
And this error when trying to build it:
➜ brew install --build-from-source autorestic
==> Downloading https://github.com/cupcakearmy/autorestic/archive/v1.0.7.tar.gz
==> Downloading from https://codeload.github.com/cupcakearmy/autorestic/tar.gz/v1.0.7
######################################################################## 100.0%
==> go run build/build.go
Error: An exception occurred within a child process:
Errno::ENOENT: No such file or directory - autorestic
Here is the /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/autorestic.rb
class Autorestic < Formula
desc "High level CLI utility for restic"
homepage "https://autorestic.vercel.app/"
url "https://github.com/cupcakearmy/autorestic/archive/v1.0.7.tar.gz"
sha256 "cb3b6614aa4ca7f56192a9d9cfbd46acd8abdad2338cf2f3e2496a859d78f905"
license "Apache-2.0"
head "https://github.com/cupcakearmy/autorestic.git"
depends_on "go" => :build
def install
ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache"
system "go", "run", "build/build.go"
bin.install "autorestic"
end
test do
system "autorestic", "help"
end
end
from autorestic.
Thanks for going ahead with it!
I would not suggest do build it from source thought as go is not installed y default on MacOS. I'll add checksums for each binary today/tomorrow
from autorestic.
I believe with Homebrew you must build it from source. Pretty sure the same is true for Nix packet manager.
from autorestic.
About the build error, I'm no expert with Go (yet) but that sounds like an issue with gopath goroot.
from autorestic.
Also we could put restic as a dependency
from autorestic.
I see, restic also builds from source. Then it's probably the way to go :)
from autorestic.
This is as far as I got. Since I'm not a developer and don't have real experience with building apps I can't help more than this😊
class Autorestic < Formula
desc "High level CLI utility for restic"
homepage "https://autorestic.vercel.app/"
url "https://github.com/cupcakearmy/autorestic/archive/v1.0.7.tar.gz"
sha256 "cb3b6614aa4ca7f56192a9d9cfbd46acd8abdad2338cf2f3e2496a859d78f905"
license "Apache-2.0"
head "https://github.com/cupcakearmy/autorestic.git"
depends_on "go" => :build
depends_on "restic"
def install
ENV["GOPATH"] = HOMEBREW_CACHE/"go_cache"
ENV["CGO_ENABLED"] = "0"
system "go", "run", "build/build.go"
bin.install "autorestic"
end
test do
system "#{bin}/autorestic", "help"
end
end
from autorestic.
Thanks you! I'll pick up from there when I find time :)
from autorestic.
Had a lot of help from the brew people, the final file looks quite different xD
https://github.com/Homebrew/homebrew-core/blob/a4115aa6ed5e71025eb069662d34a99a12eb0c55/Formula/autorestic.rb
from autorestic.
Related Issues (20)
- Hooks to have access to location path HOT 1
- Cron updates timestamp even when backup fails
- `uninstall` command is broken
- Docker compose example in the docker installation guide
- 'locations[storage]' has invalid keys: forgetoption HOT 4
- Keep up with restic releases HOT 2
- Restic repository not initialized by default in GCP
- Bug: Docker volume backup to B2 fails ("context deadline exceeded") HOT 1
- forget dryRun is always false on backup task
- Support backing up Docker volumes via the REST backend
- autorestic running backup.yml,restic print 'unknown flag: --use-fs-snapshot' HOT 1
- Copy a repo
- Add a cron option to the forget/prune policies
- Suggestion: don't require 'from' key in locations that use include arguments.
- $PATH being ignored by autorestic HOT 4
- Showing during the backup the progress in percentage of every single location
- Add more verbose error messages HOT 4
- Flag locations as paused HOT 2
- Error when running as docker container
- Error in forget / prune does not trigger failure hook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorestic.