Comments (10)
Done in Homebrew/homebrew-core#19791, thanks @vitorgalvao!
from massren.
I agree. Iβd like to see this in the main tap.
from massren.
I've tried to submit it but the formula I have is old and no longer pass their validation. Unfortunately I don't have a Mac anymore so I can't fix it myself.
If someone's interested in updating it, it can be found here. As I understand you just need to run brew audit --new-formula massren
(see here ) and fix the errors. It's small tweaks like changing single quotes to double quotes, removing trailing spaces, etc.
Anyway, if someone can fix it and do a pull request, I will submit it again.
from massren.
Getting a build error:
go
build
-o
/usr/local/Cellar/massren/1.5.1/bin/massren
src/github.com/mattn/go-sqlite3/sqlite3.go:118:2: cannot find package "golang.org/x/net/context" in any of:
/usr/local/Cellar/go/1.9.1/libexec/src/golang.org/x/net/context (from $GOROOT)
/private/tmp/massren-20171023-81591-6trj3t/massren-1.5.1/src/golang.org/x/net/context (from $GOPATH)
with the following formula:
require "language/go"
class Massren < Formula
desc "Easily rename multiple files using your text editor"
homepage "https://github.com/laurent22/massren"
url "https://github.com/laurent22/massren/archive/v1.5.1.tar.gz"
sha256 "21a602a29410e30b1b518356d5707b25b22b9d2578aaf0d0d5ab3de9e0ad225d"
depends_on "go" => :build
go_resource "github.com/jessevdk/go-flags" do
url "https://github.com/jessevdk/go-flags.git",
:revision => "f88afde2fa19a30cf50ba4b05b3d13bc6bae3079"
end
go_resource "github.com/kr/text" do
url "https://github.com/kr/text.git",
:revision => "7cafcd837844e784b526369c9bce262804aebc60"
end
go_resource "github.com/laurent22/go-sqlkv" do
url "https://github.com/laurent22/go-sqlkv.git",
:revision => "db1022af2c66c36268b346d203ceaa78579673d2"
end
go_resource "github.com/laurent22/go-trash" do
url "https://github.com/laurent22/go-trash.git",
:revision => "681610e5e1bc5214826533dfa339c84e71e49821"
end
go_resource "github.com/mattn/go-sqlite3" do
url "https://github.com/mattn/go-sqlite3.git",
:revision => "ca5e3819723d8eeaf170ad510e7da1d6d2e94a08"
end
go_resource "github.com/nu7hatch/gouuid" do
url "https://github.com/nu7hatch/gouuid.git",
:revision => "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
end
def install
ENV["GOPATH"] = buildpath
Language::Go.stage_deps resources, buildpath/"src"
system "go", "build", "-o", bin/"massren"
end
test do
assert_match version.to_s, shell_output("#{bin}/massren --version")
end
end
Also tried adding
go_resource "github.com/golang/net" do
url "https://github.com/golang/net.git",
:revision => "cd69bc3fc700721b709c3a59e16e24c67b58f6ff"
end
but no dice.
from massren.
The package path is actually "golang.org/x" so did you try go_resource "golang.org/x/net/context" do
(thought it won't be possible to specify a revision and I don't know if this parameter is optional or not)?
Alternatively, try with an earlier version of go-sqlite3 that didn't have this x/net thing yet. For example, this formula is using this revision:
go_resource "github.com/mattn/go-sqlite3" do
url "https://github.com/mattn/go-sqlite3.git",
:revision => "8897bf145272af4dd0305518cfb725a5b6d0541c"
end
Edit: actually there are also a few examples with x/net in the official repository, so maybe we can use one of these:
https://github.com/Homebrew/homebrew-core/search?utf8=%E2%9C%93&q=go_resource+golang.org+net&type=
go_resource "golang.org/x/net" do
url "https://go.googlesource.com/net.git",
:revision => "4971afdc2f162e82d185353533d3cf16188a9f4e"
end
from massren.
Success. Thank you. Opening a PR shortly.
from massren.
from massren.
Brilliant, thanks for submitting the formula. Just two things: the version number is actually 1.5.1, and also I see that the tests are failing because the test units need to create directories and files which probably is not permitted by Jenkins. So I think the simplest thing to do would be to remove the test block from the formula (the tests are checked from this repo anyway).
from massren.
Homebrew/homebrew-core#19791 (review)
In new formulae, we don't allow
go_resource
blocks. Please file an issue upstream requesting use of a Go vendor directory or one of the various Go vendoring tools.
the version number is actually 1.5.1
Fixed.
So I think the simplest thing to do would be to remove the test block from the formula
Itβs a requirement.
from massren.
For vendoring, I guess that can be done, thought I'm not really familiar with this yet.
For the tests, I don't think it's a good idea to introduce a dependency to vim just for that. I think just running this should prove that the software is installed and running properly:
massren config editor 'something'
Then call:
massren config
and check that the string "something" appears in the output. Just doing that would confirm that the SQLite database has been installed (because that's were the config is stored) and is working properly. If this is working the rest is also definitely fine too.
from massren.
Related Issues (20)
- -n and -v give very similar (read: the same) output HOT 2
- Freezes when no changes are made HOT 6
- Monitor text editor process ID and close massren if it's gone HOT 1
- Feature request: Option to merge directories upon name conflict rather than throwing an error HOT 2
- Cannot lowercase names HOT 2
- Dealing with already existing destination HOT 3
- ENHANCEMENT As a user I want (the option) to ignore file extensions so I don't have to create regex
- `include_header` is not removing header HOT 2
- Research recursive file naming #Help #Question HOT 4
- Review/fix file name punctuation (i.e. question mark ?) breaking output list order #Bug
- Option to disable the giant message every time I do a renaming operation. HOT 2
- support go modules for go 1.16 or brew will soon stop being able to build massren
- Support auto filename validation HOT 1
- Handle newlines in filenames
- Temporarily override the set editor?
- Is this project abandoned? HOT 3
- π Newly windows user here :)
- `massren .` HOT 3
- Order of filenames is not respect to explorer HOT 2
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 massren.