Skip to content

feat(scoop-bucket): List more detailed information for buckets#4704

Merged
rashil2000 merged 18 commits intoScoopInstaller:developfrom
HUMORCE:scoop-bucket
Feb 2, 2022
Merged

feat(scoop-bucket): List more detailed information for buckets#4704
rashil2000 merged 18 commits intoScoopInstaller:developfrom
HUMORCE:scoop-bucket

Conversation

@HUMORCE
Copy link
Copy Markdown
Member

@HUMORCE HUMORCE commented Feb 1, 2022

Description

show detailed list for buckets.

Motivation and Context

this is a missing part of scoop-bucket, IMO

How Has This Been Tested?

before

> scoop bucket list
1ocal
extras
java
main
nuke
tests
versions

after

> scoop bucket list

Name     Source                                     Updated             Manifests
----     ------                                     -------             ---------
1ocal    ~\scoop\buckets\1ocal                      2022-02-02 17:58:02         3
extras   git@github.com:ScoopInstaller/Extras.git   2022-02-03 00:43:11      1380
java     git@github.com:ScoopInstaller/Java.git     2022-02-02 09:58:43       215
main     git@github.com:ScoopInstaller/Main.git     2022-02-02 16:29:48       971
nuke     git@github.com:HUMORCE/nuke.git            2022-02-02 12:09:58       107
tests    git@github.com:ScoopInstaller/Tests.git    2022-01-30 01:32:15        51
versions git@github.com:ScoopInstaller/Versions.git 2022-02-03 00:54:07       276

Checklist:

  • I have read the Contributing Guide.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

Comment thread libexec/scoop-bucket.ps1 Outdated
@rashil2000
Copy link
Copy Markdown
Member

rashil2000 commented Feb 2, 2022

Would it be cool to also show the number of apps in each bucket (a field called Apps = 1330 (example))? I think it's useful.

HUMORCE and others added 3 commits February 2, 2022 23:37
Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
@HUMORCE HUMORCE changed the title refactor(scoop-bucket): Show source/lastupdate for buckets list refactor(scoop-bucket): Show detailed information for bucket list Feb 2, 2022
Comment thread libexec/scoop-bucket.ps1 Outdated
Comment thread libexec/scoop-bucket.ps1
@rashil2000
Copy link
Copy Markdown
Member

Hmm, why is friendly_path not working for me 🤔

image

image

Comment thread libexec/scoop-bucket.ps1 Outdated
@HUMORCE
Copy link
Copy Markdown
Member Author

HUMORCE commented Feb 2, 2022

Hmm, why is friendly_path not working for me 🤔

because bucket 'okay' is git repo.

> scoop bucket add cewnqj D:\Downloads\     
Checking repo... 'D:\Downloads\' doesn't look like a valid git repository

Error given:
fatal: 'D:\Downloads\' does not appear to be a git repository fatal: Could not read from remote repository. System.Management.Automation.RemoteException Please make sure you have the correct access rights and the repository exists.

and i dont know why $source is not set to null or other what.

        if (Test-Path (Join-Path $source '.git')) {
            $updated = git_cmd -C "`"$source`"" log --date=format:"`"%Y-%m-%d %H:%M:%S`"" --format='%ad' -n 1
            $source = git_cmd -C "`"$source`"" config remote.origin.url
        }

$source is set to SCOOP\buckets\BUCKET_NAME in foreach L1

@rashil2000
Copy link
Copy Markdown
Member

rashil2000 commented Feb 2, 2022

Hmm, local buckets aren't fully supported as of now. Can be solved later.

Other than that, this PR looks great. One minor nit: I think this should be feat(scoop-bucket) instead of refactor(scoop-bucket) in the Changelog, because it doesn't refactor anything but adds new features.

@HUMORCE HUMORCE changed the title refactor(scoop-bucket): Show detailed information for bucket list feat(scoop-bucket): List more detailed information for buckets Feb 2, 2022
@rashil2000 rashil2000 merged commit 0e4721a into ScoopInstaller:develop Feb 2, 2022
@HUMORCE
Copy link
Copy Markdown
Member Author

HUMORCE commented Feb 2, 2022

it is kind like replacing the entire hardware of a computer step by step, but it is still actually a computer at end.

i dont know how to define them in this case, but i take your advice.

@HUMORCE HUMORCE deleted the scoop-bucket branch February 2, 2022 20:10
@niheaven
Copy link
Copy Markdown
Member

niheaven commented Feb 8, 2022

it is kind like replacing the entire hardware of a computer step by step, but it is still actually a computer at end.

i dont know how to define them in this case, but i take your advice.

refactor is refactoring some code, without change its functionality and UI (maybe a little tweak), while feature means add new functionality to some existing function or UI. So yes, feature is more precise.

PS, some changes under refactor in CHANGELOG.md are just fix IMO :)

se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
…Installer#4704)

* refactor(scoop-bucket): Show source/lastupdate for buckets

* use `StartsWith`

* CHANGELOG

* punctuation

* style

* upd

* Update libexec/scoop-bucket.ps1

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>

* count num of manifests in the buckets

* update changelog

* remove write-host

* friendly_path

* datetime format

* order

* sty

* prop.

* trim

* obj

* update CHANGELOG

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants