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

Humanize bytes in dir index listing #1618

Merged
merged 1 commit into from
Sep 3, 2015
Merged

Conversation

rht
Copy link
Contributor

@rht rht commented Aug 28, 2015

@jbenet jbenet added the status/in-progress In progress label Aug 28, 2015
@jbenet
Copy link
Member

jbenet commented Aug 28, 2015

LGTM

@jbenet
Copy link
Member

jbenet commented Aug 28, 2015

(guessing vendor first, then merge)

@ghost
Copy link

ghost commented Aug 28, 2015

looking forward to meeting the first humanoid bytes

@rht
Copy link
Contributor Author

rht commented Aug 29, 2015

Here is the chronology

  • dir-index-html (master): git commit -a -m "Remove 'bytes'"
  • dir-index-html (master): git push upstream master
  • dir-index-html (master): gx publish
  • dir-index-html (master): new_hash=get_the_hash_from_prev_output_with_mouse``
  • dir-index-html (master): cd $go_ipfs_repo
  • go-ipfs (dir-index-humanize): old_hash=get_the_hash_from_vendor_src_with_mouse``
  • go-ipfs (dir-index-humanize): ipfs daemon &
  • go-ipfs (dir-index-humanize): gx update $old_hash $new_hash
  • go-ipfs (dir-index-humanize): cd assets
  • go-ipfs (dir-index-humanize): ln -sf ../vendor/src/$new_hash/dir-index-html/gw-assets gw-assets
  • go-ipfs (dir-index-humanize): sed -i s/$old_hash/$new_hash/ core/corehttp/gateway_indexPage.go # because sed: couldn't edit assets: not a regular file
  • go-ipfs (dir-index-humanize): go-bindata -pkg=assets init-doc gw-assets ../vendor/src/$new_hash/dir-index-html/dir-index.html ../vendor/src/$new_hash/dir-index-html/knownIcons.txt && cd -
  • go-ipfs (dir-index-humanize): git rm -r vendor/src/$old_hash
  • go-ipfs (dir-index-humanize): git add vendor/src/$new_hash
  • go-ipfs (dir-index-humanize): git commit --amend --no-edit -a
  • go-ipfs (dir-index-humanize): git push --force

@jbenet
Copy link
Member

jbenet commented Aug 29, 2015

wonder how we want to be using gx. cc @whyrusleeping for feedback.

i.e. that seemed like a lot of work. how can we make this a simpler process?

@jbenet
Copy link
Member

jbenet commented Aug 29, 2015

@rht could we turn this into a quick script or something?

make update

in that directory or something.

@rht
Copy link
Contributor Author

rht commented Aug 30, 2015

The only make update parts are

update() {
hash="$1"
cd assets
ln -sf ../vendor/src/$hash/dir-index-html/gw-assets gw-assets # will be removed after https://github.com/ipfs/go-ipfs/pull/1615
go-bindata -pkg=assets init-doc gw-assets ../vendor/src/$hash/dir-index-html
cd -
}

The rest should be a git hook like git gx-update $oldhash $newhash.

@jbenet
Copy link
Member

jbenet commented Sep 2, 2015

@rht sure, can you add that to a script/makefile there?

@rht
Copy link
Contributor Author

rht commented Sep 3, 2015

@jbenet the make will be simpler (no need to pass the hash to the make update) after @lgierth's update on dir-index-html.

@jbenet
Copy link
Member

jbenet commented Sep 3, 2015

Ok

jbenet added a commit that referenced this pull request Sep 3, 2015
Humanize bytes in dir index listing
@jbenet jbenet merged commit 9c40bf1 into ipfs:master Sep 3, 2015
@jbenet jbenet removed the status/in-progress In progress label Sep 3, 2015
@rht rht deleted the dir-index-humanize branch September 10, 2015 02:49
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
72 tasks
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.

2 participants