Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the activator command to generate application secret?

I'm using Play Framework 2.3.6. Since Play 2.3.x play commands are replaced with activator commands. Play's documentation for 2.3.x as well as latest 2.4.x mentions commands play-generate-secret and play-update-secret but I am not able to find corresponding activator commands.

We may not choose to use these secrets for production environment but would like play to generate secrets for integration and pre-prod environments - which we can change frequently.

Has anyone done this before? What are the proper activator commands?

like image 349
Onkar Vaidya Avatar asked Nov 27 '14 12:11

Onkar Vaidya


2 Answers

Both

activator play-generate-secret

and

activator play-update-secret

work well for the Activator.

You can find their definition here in the sources. And as you can see they are part of Play and not the Activator.

val generateSecret = TaskKey[String]("play-generate-secret", "Generate a new application secret", KeyRanks.BTask)
val updateSecret = TaskKey[File]("play-update-secret", "Update the application conf to generate an application secret", KeyRanks.BTask)
like image 109
Daniel Olszewski Avatar answered Oct 29 '22 16:10

Daniel Olszewski


As the comment from @john mentions, this is

activator playGenerateSecret

from Play 2.4 onwards.

like image 43
Big Rich Avatar answered Oct 29 '22 15:10

Big Rich