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

added install and clean targets update flake.nix #485

Merged
merged 1 commit into from Jul 24, 2020

Conversation

nixinator
Copy link
Member

This add two new targets (install, clean)

install , which scoops up the artefacts from the build process to build/

flake.nix modified to to make install and copy the build/ dir to $out.

the better way is to modify the make file entirely, but it's not a simple as it seems.

also this might break deployment to netify??????

@garbas
Copy link
Member

garbas commented Jun 22, 2020

This approach will break the development cycle. Since it would not copy things to build/ when items change. I would much rather see we explicitly move things to build/.

@garbas garbas self-requested a review June 22, 2020 07:56
@nixinator
Copy link
Member Author

nixinator commented Jun 22, 2020

noted...

alternatively bring the copy changes into the deployment script?

- name: Building nixos.org
  run: |
    nix build
    mkdir build
    cp -RL ./result/* ./build/
- name: Deploy to Netlify

to something like this...

- name: Building nixos.org
  run: |
    nix build
   	fd -I -t d -x mkdir -p build/{}   
fd -I -t f -t l '(.*?)\.(gpg|svg|xml|ico|css|jpg|gif|doc|pdf|html|png|js|cast|ico|robots.txt)$$' -x 
   cp -a ./result/*{} ./build/{}
- name: Deploy to Netlify

but the cleanest way to rewrite the make file.

@garbas
Copy link
Member

garbas commented Jun 22, 2020

With the last proposed solution we would only catch problems once we deploy to Netlify and we wouldn't be able to catch them locally.

I still believe best approach would be to prepend build/ to targets in Makefile.

@garbas garbas merged commit 1d3a779 into NixOS:integrate-new-search Jul 24, 2020
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.

None yet

2 participants