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

Staging does not clear out previous files #175

Closed
huntc opened this issue Feb 28, 2014 · 5 comments · Fixed by #202
Closed

Staging does not clear out previous files #175

huntc opened this issue Feb 28, 2014 · 5 comments · Fixed by #202

Comments

@huntc
Copy link
Contributor

huntc commented Feb 28, 2014

Stage should ensure that the files in the staging folder are part of the current build only, and not left over from previous builds. Perhaps sbt's sync functionality should be utilised when copying files to this folder.

Related to playframework/playframework#2418

@benmccann
Copy link
Contributor

Just FYI, it takes almost no time to blast away the directory and recreate it, so if that's easier it should be a sufficient solution.

@huntc
Copy link
Contributor Author

huntc commented Feb 28, 2014

Sure, but with sbt's sync functionality and a very large project, it may make a difference. The sync functionality is also quite easy to use.

@benmccann
Copy link
Contributor

Cool. As long as it's easy :-)

@huntc
Copy link
Contributor Author

huntc commented Feb 28, 2014

Some similar code:

  private def syncMappings(cacheDir: File, mappings: Seq[PathMapping], target: File): File = {
    val cache = cacheDir / "sync-mappings"
    val copies = mappings map {
      case (file, path) => file -> (target / path)
    }
    Sync(cache)(copies)
    target
  }

@jsuereth jsuereth added this to the 0.7.0 - Server archetype milestone Mar 10, 2014
@jsuereth jsuereth added the bug label Mar 10, 2014
@muuki88
Copy link
Contributor

muuki88 commented Mar 14, 2014

@aparkinson do you have some time for this? I will be bit busy the next week(s) :(

jsuereth added a commit that referenced this issue Mar 26, 2014
* Use sync when copying to staging directory
* Add test to make sure incrementally removing files shows up correctly.

NOTE: we may need to feed this through all our staging, e.g. when generating
MSIs or RPMs or DEBs.
muuki88 added a commit that referenced this issue Mar 27, 2014
Fixes #175 - Staging does not clear previous files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants