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

Add file sync option to zip command #91

Merged
merged 1 commit into from
Apr 2, 2019
Merged

Add file sync option to zip command #91

merged 1 commit into from
Apr 2, 2019

Conversation

pkova
Copy link
Contributor

@pkova pkova commented Apr 2, 2019

Fixes #84

The problem can be reproduced by running npm run release, modifying some code, running npm run release again and inspecting the .zip.

You'll get something like

tree -D build
build
├── [Apr  2 17:09]  asset-manifest.json
├── [Mar 18 22:53]  favicon.ico
├── [Apr  2 17:09]  index.html
├── [Mar 18 22:53]  manifest.json
├── [Apr  2 17:09]  precache-manifest.4eb231253bd00e4e654613b55221e927.js
├── [Apr  2 17:07]  precache-manifest.955df6be55bd39037f7132152208d8ce.js
├── [Apr  2 17:09]  service-worker.js
└── [Apr  2 17:09]  static
    ├── [Apr  2 17:09]  css
    │   ├── [Apr  2 17:09]  main.17bd1ca5.chunk.css
    │   └── [Apr  2 17:09]  main.17bd1ca5.chunk.css.map
    ├── [Apr  2 17:09]  js
    │   ├── [Apr  2 17:09]  1.7700c553.chunk.js
    │   ├── [Apr  2 17:09]  1.7700c553.chunk.js.map
    │   ├── [Apr  2 17:09]  main.32589c19.chunk.js
    │   ├── [Apr  2 17:09]  main.32589c19.chunk.js.map
    │   ├── [Apr  2 17:07]  main.c99d9132.chunk.js
    │   ├── [Apr  2 17:07]  main.c99d9132.chunk.js.map
    │   ├── [Apr  2 17:09]  runtime~main.229c360f.js
    │   └── [Apr  2 17:09]  runtime~main.229c360f.js.map
    └── [Apr  2 17:09]  media
        ├── [Apr  2 17:09]  Inter-UI-Medium.5292a06c.woff
        ├── [Apr  2 17:09]  Inter-UI-Medium.63ba5137.woff2
        ├── [Apr  2 17:09]  Inter-UI-Regular.b36fe2ea.woff
        ├── [Apr  2 17:09]  Inter-UI-Regular.d74d59d2.woff2
        ├── [Apr  2 17:09]  Inter-UI-SemiBold.462a99bc.woff
        └── [Apr  2 17:09]  Inter-UI-SemiBold.a2ae283d.woff2

Where the hashes are different and therefore some files get added twice.

Adding the file sync option to the zip command fixes this.

@alexmatz alexmatz requested a review from Fang- April 2, 2019 16:51
@alexmatz
Copy link
Contributor

alexmatz commented Apr 2, 2019

Thanks for your contribution @pkova! Much appreciated and delighted to have you involved :)

Copy link
Member

@Fang- Fang- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, this is a really nice fix. Thanks!

@Fang- Fang- merged commit a4f5b75 into urbit:master Apr 2, 2019
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.

Having previous release in repo root messes up npm run release
3 participants