Code Monkey home page Code Monkey logo

Comments (32)

tj avatar tj commented on August 23, 2024 1

yeaa I was thinking about that, ends up being pretty ugly but the chmod sort of ruins it anyway I guess sans-| sh

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024 1

it works :)

from godownloader.

client9 avatar client9 commented on August 23, 2024 1

yeah go for it @caarlos0

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

I was thinking basically the same thing some time ago.

I think it is a good idea...

We may even use up for this =D

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

this may even invalidate goreleaser/goreleaser#297

from godownloader.

tj avatar tj commented on August 23, 2024

I'd definitely help! Always worried I'll miss updates for platforms that I never use. I couldn't think of a decent domain that isn't taken but there's gotta be something.

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

@tj maybe something like:

curl -sf http://install.pipesh.io/tj/[email protected] | sh

or even

curl -sf http://install.pipe.sh/tj/[email protected] | sh

or something like that :P

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

a wild idea maybe we could instruct the user to do something like:

curl -sf --header "uname: $(uname -a)" http://whatever/tj/[email protected] | sh

this way we could make the shell simpler - which would be good for people who don't like the curl pipe sh approach...

from godownloader.

client9 avatar client9 commented on August 23, 2024

Hi @tj @caarlos0

Thinking of what problem do we want to solve, I came up with this:

  1. make it easy for people to have a godownloader script
  2. make it easy to keep a godownloader script up to date.

and do this with $0 cost to us. There are lot of clever things we could do with S3, lambda, hosting, etc. but not sure it's really worth it. If someone wants to discuss further, I'm happy to jump on a slack, to discuss.

Anyways for solutions! My idea is based on what home-brew for macOS does:

Another(?) repo has a list of people or repos using goreleaser and want an automatic downloader. People could add themselves with a pull request. The owner of the repo wouldn't even need to do this... anyone seeing a repo with a .goreleaser file could make a pull request. This list could be pre-seeded as well. We get free stats on use of godownloader too!

On repo change, travis-ci runs and, gets latest godownloader, and regenerates all godownloader scripts and commits them to GitHub repo (most would not change). Maybe with a format of "install-OWNER-REPO.sh" Then everyone would have a stable curl|bash URL that is up-to-date. You could also quickly check if a given repo has a script. Given that travis-ci can run for hours, I think this would work for 1,000,000s of repos before we had problems. Given that GitHub seems to support home-brew which is massively larger and more complex, I don't think they'd care.

Definitely not perfect... but I think system above solves the problem for most people and $0 for us.

counteroffers and enhancements definitely welcome!

n

update: goreleaser could also check the current repo, and see if it is "godownloader enabled". If not, it could emit a warning or something... telling the user to make a pull-request.

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

I like this idea.

The only problem I see is if the user changes the goreleaser.yml file, we don't have a way of knowing that to re-generate the install file...

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

I also don't mind spending a few bucks on this (lambda is really cheap I guess).

Maybe we could get sponsor even. DigitalOcean usually helps OSS, maybe they're interested in this.
Dunno about other corps...

from godownloader.

client9 avatar client9 commented on August 23, 2024

The only problem I see is if the user changes the goreleaser.yml file,
we don't have a way of knowing that to re-generate the install file...

re-run once a day?
https://docs.travis-ci.com/user/cron-jobs/

Although they could submit another pull request as well.

I also don't mind spending a few bucks on this (lambda is really cheap I guess).
Maybe we could get sponsor even. DigitalOcean usually helps OSS, maybe they're interested in this.

It's not exactly clear what we want to do here, so maybe try the dumb solution first and then augment it with other stuff once we get some more knowledge? In particular, we could launch the dumb github/travis.ci version in a day hour. If we gotta use AWS or Dig Ocean, then so be it.

Here's my first take on the repo.

repo
   main.go
   other-code.go
   godownloader/  <-- directory for placeholder yaml files 
       github.com/
           client9/
               misspell.yaml
           tdewolff
               minify.yaml

the yaml file is probably empty but would let us expand on it if need be. People would send PR to add to the tree. (and could add a yaml comment to retrigger a build).

not sure about the ouput .sh files. If we commit them back into a repo it would look like:

https://raw.githubusercontent.com/goreleaser/REPO/master/???/github.com/client9/misspell.sh

Another option is to use GitHub pages! and just dump it into the goreleaser tree

goreleaser.com/XXX/github.com/client9/misspell.sh

let cloud flare and GitHub do the hosting and TLS.

thoughts? Open to anything!

n

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

re-run once a day?

yeah, you're right. Also it's not a problem until it is a problem (like, someone reported it or something).

I like the idea of the github pages a well, we get tls and hosting as you said, and also cleaner URLs, which is nice.

Other than that, the users could use URL shorteners to get even smaller URLs (or redirects in their domains or whatever).

Anyway, imho, let's do this!

Thoughts on the repo names?

from godownloader.

client9 avatar client9 commented on August 23, 2024

cool.

let's do it.

goinstall ?

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

works for me!

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

created repo and gave you admin rights

from godownloader.

client9 avatar client9 commented on August 23, 2024

Speaking of GitHub pages... I see we both got bit by the travis-ci bug and had to downgrade.

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

Speaking of GitHub pages... I see we both got it by the travis-ci bug and had to downgrade.

yeah, spent a good few minutes to figure that out...

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

@client9 how can I help on this one?

from godownloader.

client9 avatar client9 commented on August 23, 2024

hi @caarlos0 yeah my day job has been getting in the way with this ;-)

If we want the hosted files to be GitHub pages, then we'll need a goinstall.github.io repo

Do we want the goreleaser/godownloader repo to have the tree/list of repos to make .sh file for? Or do we want that in separate repo (I think you made goinstall repo)

there are pros and cons to each.

To publish, we'll need a add GITHUB_TOKEN to the appropriate travis-ci repo.

from godownloader.

client9 avatar client9 commented on August 23, 2024

so that was 22 days ... sigh.

ok.. so...

./godownloader --tree=tree treeout

will look at the directory of tree and emit shell code in treeout

i.e.

IN  --> tree/github.com/client9/misspell.yaml
OUT --> treeout/github.com/client9/misspell.sh

you will see many! gross! hacks!, so consider this a work in progress.

To make this happen:

curl https://goinstall.github.com/github.com/client9/misspell.sh | bash

I recommend the following:

deploy:
  provider: pages
  skip_cleanup: true
  github_token: $GITHUB_TOKEN
  local_dir: treeout  <---- this is our output
  target_branch: master
  repo: goreleaser/goinstall.github.io  <--- pages are in goinstall.github.io
  verbose: true
  on:
    branch: master

this will force push to GitHub. We can add a home page or something else but the shell code should be pushed.

comments welcome as always @caarlos0

I just made up all the naming "tree", "treeout", "goinstall.github.io"... would love better names!

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

Hey @client9

Awesome work!

I think we can polish the code as always, but overall looks good.

We already have the repo goreleaser/goinstall, so I think we can start publishing if you think it's good enough for a beta test...

Let me know what the next steps are and how I can help :D

from godownloader.

client9 avatar client9 commented on August 23, 2024

Hola @caarlos0

thank you!

I just added the magic to .travis.yaml to make it deploy. It seems to work

this file got created

https://github.com/goreleaser/goinstall/blob/master/github.com/client9/misspell.sh

and has a perma link of:

https://raw.githubusercontent.com/goreleaser/goinstall/master/github.com/client9/misspell.sh

Great!

But... I turned on github pages.

I expected this to work

https://goreleaser.github.io/goinstall/github.com/client9/misspell.sh

but due to DNS it redirects the following which doesn't exist

http://goreleaser.com/goinstall/github.com/client9/misspell.sh

I'm not sure what DNS magic is needed to fix this.

I'm open to ideas on how to do publishing (or other ideas).

what do you think?

n

GitHub
Contribute to goinstall development by creating an account on GitHub.

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

maybe I can add a CNAME from install.goreleaser.com, let me take a look

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

Working!

https://install.goreleaser.com/

https://install.goreleaser.com/github.com/client9/misspell.sh

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

added valelint/vale to godownloader, and it worksss!

https://travis-ci.org/caarlos0/carlosbecker.com/builds/367165330

this is pure awesomeness!


EDIT: it stopped working for some reason


EDIT2: fixed, travis removed the CNAME file from the root folder :(

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

just added node-prune, as it was the original example

https://github.com/goreleaser/godownloader/blob/master/tree/github.com/tj/node-prune.yaml

https://install.goreleaser.com/github.com/tj/node-prune.sh

GitHub
godownloader - Download Go binaries as fast and easily as possible.

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

trying to fix the cname thing: 39bc4e8

from godownloader.

client9 avatar client9 commented on August 23, 2024

WHOA....

just need to make a home page ... perhaps a list of everything in it.

https://install.goreleaser.com

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

just need to make a home page ... perhaps a list of everything in it.

yeah, will try to work on that if you don't mind :)

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

check https://install.goreleaser.com/

from godownloader.

caarlos0 avatar caarlos0 commented on August 23, 2024

I think we can close this one, right?

closing, reopen if needed

from godownloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.