          :redhat-preinst  (quoted-list (get-preinst ezbake-vars upstream-ezbake-configs build-target :redhat))}))))
 
 (defn generate-project-data-yaml
-  [lein-project]
+  [lein-project build-target]
   (println "generating project_data.yaml file")
   (spit
     (fs/file staging-dir "ext" "project_data.yaml")

      (stencil/render-string
        (slurp "./staging-templates/ezbake.rb.mustache")
        {:project         (:name lein-project)
         :user            (get-local-ezbake-var lein-project build-target :user
                                                (:name lein-project))
         :group           (get-local-ezbake-var lein-project build-target :group
                                                (:name lein-project))
         :uberjar-name    (:uberjar-name lein-project)
         :config-files    (quoted-list config-files)

       })))

(defn stage-all-the-things
  [project project-file]
  (let [lein-project (project/read project-file)
        build-target (get-local-ezbake-var lein-project :build-type "foss")
        template-dir (fs/file template-dir-prefix build-target)
        ]
  (clean)
  (cp-template-files template-dir)
  (cp-shared-files)
  (let [config-files (cp-shared-config-files lein-project)
        config-files (cp-project-config-files project config-files)]
    (cp-doc-files lein-project)
    (cp-project-file project-file)
