Skip to content

Commit

Permalink
Replace %project-name% in ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
swlkr committed Feb 21, 2020
1 parent 7bbf586 commit e2bbff6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/joy/cli/projects.janet
Expand Up @@ -26,4 +26,10 @@
(set tmp (->> (file/read f :all)
(string/replace-all "%encryption-key%" (cipher/encryption-key)))))
(helper/with-file [f (path/join project-name ".env") :w]
(file/write f tmp))

(helper/with-file [f (path/join project-name "ENV") :r]
(set tmp (->> (file/read f :all)
(string/replace-all "%project-name%" project-name))))
(helper/with-file [f (path/join project-name "ENV") :w]
(file/write f tmp))))

0 comments on commit e2bbff6

Please sign in to comment.