Skip to content

Msameim181/gdrive-cli-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build GDrive CLI

GDrive CLI Builder

GDrive CLI is a great tools, but because the owner is hardcoded the credentials directly to the code, it's makes every one who use the release package from this project is sharing the same quota. So i try to make this repository to help who want to build the package using their own credentials.

Note: This Repo is using a Fork of GDrive in this Repo

Note: Use this Page To clean your Code. GDrive CLI Builder

Problems that arise due to limit quota or etc.

Error

Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.

Prerequisites

  • GitHub Account
  • Google Account

How to

Create your own Google Drive API credentials
  1. Go to Google developer console and create new project

    P.S. This page only shown if it's your first time accesing Google developer console

    • Read terms and conditions ✌ and then click ACCEPT AND CONTINUE

    Step 1

    • Create a project if you have not yet by click the CREATE PROJECT button

    Step 2

    • Fill out your project name and then click CREATE

    Step 3

  2. Go to Google Drive API section and enable it

    • Click ACTIVATE

    Step 4

  3. Create Credential [1]

    • Click CREATE CREDENTIAL

    Step 5

    • Fill out the form and then click What credentials do I need?

    Step 6

  4. Create OAuth consent screen

    • Click SET UP CONSENT SCREEN

    Step 7

    • Choose External and then click CREATE

    Step 8

    • Fill out the form and then click SAVE

    Step 9

  5. Create Credential [2]

    • Fill out your client id name and then click CREATE OAUTH CLIENT ID

    Step 10

    • Download your client_id.json file and keep this file

    Step 11

Setup GitHub Actions
  1. Fork this repository

    • Click the fork button

    Setup, Setup 1

  2. Enable GitHub Actions in your repository

    • Click the Actions tab and then click I understand my workflows, go ahead and run them

    Setup, Setup 2

  3. Create secret that contain your CLIENT_ID and CLIENT_SECRET

    • Click Settings > Secrets > Actions > New repository secret

    Setup, Setup 3

    • Open your client_id.json file then copy CLIENT_ID, CLIENT_SECRET and REDIRECT_URL to create secrets

      • Set REDIRECT_URL like the image below. You can change the REDIRECT_URL to your own, but you must change the REDIRECT_URL in Google Credential page too.
      • For better result set REDIRECT_URL to "http://localhost:3030" and then for using and getting the Code run localhost_server.py. Setup, Setup 4
    • Make sure you have CLIENT_ID, CLIENT_SECRET and REDIRECT_URL secret

    Setup, Setup 5

Build GDrive CLI using GitHub Actions
  1. Choose your platform by editing the list.txt file inside build directory

    Build, Build 1

    • Edit file by click the pencil icon

    Build, Build 2

    • Write your platform in list.txt file. You can write multiple platform (split by line)

      Supported platfrom
      • darwin/386
      • darwin/amd64
      • darwin/arm
      • darwin/arm64
      • dragonfly/amd64
      • freebsd/386
      • freebsd/amd64
      • freebsd/arm
      • linux/386
      • linux/amd64
      • linux/arm
      • linux/arm64
      • linux/ppc64
      • linux/ppc64le
      • linux/mips64
      • linux/mips64le
      • linux/rpi
      • netbsd/386
      • netbsd/amd64
      • netbsd/arm
      • openbsd/386
      • openbsd/amd64
      • openbsd/arm
      • plan9/386
      • plan9/amd64
      • solaris/amd64
      • windows/386
      • windows/amd64

    Build, Build 3

    • Save this file by commit the change

    P.S. Because GitHub Actions didn't have manual trigger to build, so we only can trigger the build process by commit changes and push it to master branch

    Build, Build 4

    • Inspect your build process by click Actions > Build GDrive CLI workflow > {Your commit message} i.e. Update list.txt

    Build, Build 5

    • Make sure all step is successfully build

    Build, Build 6 Build, Build 7

    • If the build process has been finished, you can download the file by click Artifacts button in top-right section

    P.S. You can also delete this file by click the trash icon so another user cannot download this file

    Build, Build 8

Using GDrive CLI

On unix systems run chmod +x {filename} after download to make the binary executable.

Official documentation

Contributors

  • Ma'ruf Shidiq - Initialize GitHub Actions workflow - marufshidiq
  • Văn Lộc Võ - Add support to compile for mips/mipsle architecture - vvanloc

Thanks to

prasmussen and all GDrive CLI contributor for creating a great tools

About

Build GDrive CLI (https://github.com/Msameim181/gdrive) with your own credentials using GitHub Actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published