Skip to content

ndaidong/godler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godler

Deployer for my Go projects

Setup

wget https://github.com/ndaidong/godler/releases/latest/download/godler_linux_amd64 -O godler
chmod +x godler
./godler -v

mkdir -p ~/.local/bin
mv ./godler ~/.local/bin
godler -v

Usage

Download a release asset

# Download to current directory
godler -u https://github.com/org/repo/releases/download/v1.0.0/app_linux_amd64

# Download and rename
godler -n app -u https://github.com/org/repo/releases/download/v1.0.0/app_linux_amd64

# Download to a specific directory
godler -p ~/.local/bin -u https://github.com/org/repo/releases/download/v1.0.0/app_linux_amd64

# Download to a specific path (directory + name)
godler -d ~/.local/bin/app -u https://github.com/org/repo/releases/download/v1.0.0/app_linux_amd64

# Download with checksum verification
godler -c <sha256> -u https://github.com/org/repo/releases/download/v1.0.0/app_linux_amd64

Flags

Flag Description
-h Show available arguments
-v Print version info
-u Target download URL
-n Rename downloaded file
-p Download directory
-d Full destination path
-c Expected SHA256 checksum
  • Flags -n and -d are mutually exclusive.
  • Flags -p and -d are mutually exclusive.

Configuration (for private repos)

Create ~/.config/godler/config.json:

{
  "orgs": {
    "orgnanization-one": "ghp_xxxxxxxxxxxxxxxxxxxx",
    "orgnanization-two": "ghp_yyyyyyyyyyyyyyyyyyyy"
  }
}

The token is looked up by the organization name from the URL. If no token is found, the download proceeds without authentication (public repo).

Notes

  • Standard URL format: godler expects GitHub release asset URLs in the format: https://github.com/{org}/{repo}/releases/download/{tag}/{asset}
  • Home directory: godler assumes $HOME is set. Config is read from ~/.config/godler/config.json.

Development

make build VERSION=v1.2.3
make test

About

Deployer for Go project

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors