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

[Installer] Create a random string generate rnd and publish with goreleaser #23

Open
11 tasks
coolaj86 opened this issue Jun 13, 2021 · 7 comments
Open
11 tasks
Assignees
Labels

Comments

@coolaj86
Copy link
Member

coolaj86 commented Jun 13, 2021

Add rnd

This is two parts:

  1. A program called rnd that spits out a random string (for passwords, tokens, etc)
  2. Make installable via webi (could be done by a different person, such as myself)

Currently I have some aliases for creating random strings:

webi aliasman

aliasman alias rnd='xxd -l24 -ps /dev/urandom | xxd -r -ps | base64 | tr -d = | tr + - | tr / _'
aliasman alias xrnd='xxd -l24 -ps /dev/urandom'

It would be trivial to create a cross-platform Go program that spits out a random string.

rnd
2> (196-bit, base64)
> Zys_yZqEySPS5il0l1Vew_y46fQwAqvL
rnd --hex --bits 128
2> (128-bit, hexidecimal)
> 506cc039ef529b631d3d6a6baff6717e

Honestly, I'd prefer it in Rust, but I have yet to see a simple solution for cross compiling to multiple platforms from a Linux host (yes, Windows too, no the user to separately install the visual studio runtime distribution is not acceptable).

Getting this on webi would as simple as copying _example, updating the github releases
info, and doing a find and replace on a few file system path names.

There are several Go programs on here which are released with goreleaser which could serve as examples.

Part 2. How to create a webi installer

Video Tutorial: How to create a webi Installer

Skills required

  • Basic Command Line knowledge (mkdir, mv, ls, tar, unzip, variables)

Steps

  1. Clone and setup the webi packages repo
    git clone [email protected]:webinstall/packages.git
    pushd packages/
    npm install
  2. Copy the example template and update with info from Official Releases:
    https://github.com/___CHANGE/ME___/releases
    rsync -av _example/ CHANGE-ME/
    • update CHANGE-ME/release.js to use the official repo
    • Learn how CHANGE-ME unpacks (i.e. as a single file? as a .tar.gz? as
      a .tar.gz with a folder named CHANGE-ME?)
    • find and replace to change the name
      • update CHANGE-ME/install.sh (see bat and jq as examples)
      • update CHANGE-ME/install.ps1 (see bat and jq as examples)
  3. Needs an updated tagline and cheat sheet
    • update CHANGE-ME/README.md
      • official URL
      • tagline
      • Switch versions
      • description / summary
      • General pointers on usage (and perhaps "gotchas")

It's also okay to have multiple people work on part of this (i.e. the Cheat
Sheet can be done independently from the install.sh)

@coolaj86 coolaj86 changed the title [Installer] rnd [Installer] Create a random string generate rnd and publish with goreleaser Jun 15, 2021
@coolaj86 coolaj86 added the good first issue Good for newcomers label Jun 15, 2021
@khairnarsaurabh23
Copy link

Can i work on this ?

@coolaj86
Copy link
Member Author

@khairnarsaurabh23 Sure. Take a look here:
BeyondCodeBootcamp/beyondcodebootcamp#10 (comment)

Have you used GoReleaser before?

@khairnarsaurabh23
Copy link

No, I haven't used it before. But I'll learn about it, for sure.

@khairnarsaurabh23
Copy link

I'm finding it defficult to work on issue with given information. Sir, the link you have given in step 2 goes to nothing. Can you please help me out ?
@coolaj86

@coolaj86
Copy link
Member Author

@khairnarsaurabh23 There is no link in step two. You'd have to create it yourself.

What's your experience programming in Go?

@khairnarsaurabh23
Copy link

I've no programing experience in Go.

@coolaj86
Copy link
Member Author

Were you planning to write a cross-platform rnd program?

If you just want to add an existing program to Webi, you might try one that already exists, like delta (see webinstall/webi-installers#320) instead.

@coolaj86 coolaj86 transferred this issue from webinstall/webi-installers Oct 12, 2023
@coolaj86 coolaj86 transferred this issue from webinstall/webi-installer-requests Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants