How do I know which version of the playback I'm using?

A really stupid question, but I used Activator to get started with the playback platform, and now you need to see which version I'm using. 2.3 came out with docker support, but when I put

dockerExposedPorts in Docker := Seq(9000, 9443)

in my build.sbt , it complains that it does not know what dockerExposedPorts is, so I think I can run 2.2.

+52
scala playframework typesafe-activator
Oct. 16 '14 at 16:50
source share
2 answers

Enter playVersion in the activator console.

Alternatively, you can look at project/plugins.sbt for the string

 addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.2") 

In this example, the playback version is 2.3.2

+85
Oct 17 '14 at 6:52
source share

I use the following to list and highlight all playback versions in a playback project. Works for a multi-module project.

It was further tested on MacOS Sierra using BSD's default find that it comes with and GNU Grep is installed using brew install grep . The latter is necessary because the next command requires grep, which supports the Perl regular expression (and BSD grep does not).

You can check if grep in your PATH has Perl-regex support by doing this (should show that the -P option is available):

  $ ggrep --help | grep -i Perl -P, --perl-regexp PATTERN is a Perl regular expression 

(ggrep is GNU grep installed via Homebrew)

Now let's move on to the actual command (note the g grep in the command):

  $ find . -name "plugins.sbt" -exec ggrep -PHin --color=always 'com.typesafe.play.*sbt-plugin.*%\s*"\K.*?(?=")' {} \; 

which outputs: enter image description here

Brief notes on grep options (extracted from grep help):

  -P, --perl-regexp PATTERN is a Perl regular expression -i, --ignore-case ignore case distinctions -n, --line-number print line number with output lines -H, --with-filename print file name with output lines 
+1
Jul 17 '18 at 11:35
source share



All Articles