-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathTODO.txt
134 lines (101 loc) · 4.77 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Chris Nappin's play-recaptcha project todo list
===============================================
done for version 3.0
--------------------
- added support for Play 3.x, Scala 3.x
- updated all dependencies and docs
- converted unit tests to use "plain" mockito, because mockito-scala and specs2-mock doesn't
support Scala 3.x
Google reCAPTCHA
----------------
My personal key is registered to nappin.com (but works with localhost)
Google development documentation is at https://developers.google.com/recaptcha/docs/display
local dev env
-------------
Using sdkman to manage java, scala, sbt
Using java 17 (Play still supports java 11 but not planned for much longer)
Using scala 2.13.x as in build.sbt (Play no longer supports 2.12.x)
Using sbt 1.9.x
If using a laptop with VPN/proxy, need to explicitly import all altered SSL
certificates into cacerts (on windows, run as admin) for sbt/ivy downloads to work:
keytool -import -alias <website> -cacerts -file "<website>.crt"
Using gpg 2.2.x included within Git Bash (on windows), added to PATH
Import my private key to the default keyring by running:
gpg --import secring.asc
to use sbt
----------
run "sbt" (to enter the shell) then run:
use: + <command> to build against all cross scala versions
use: ++ <version> <command> to use that specific version of scala
clean
compile
test
scalastyle (not scala 2.13)
run
or
dependencyTree
or
sbt clean coverage test
sbt coverageReport
(then see console or target/scala-2.x/scoverage-report/index.html)
to publish locally
------------------
run "sbt" (to enter the shell) then run:
+ publishLocal
or
+ publishLocalSigned
writes to ~/.ivy2/local/com.nappin/play-recaptcha_2.x/a.b (for each scala version)
to publish on Maven Central
---------------------------
sbt uses the standard Maven2 repository (http://repo1.maven.org/maven/ aka http://central.sonatype.org) by default
see http://mfizz.com/blog/2013/07/play-framework-module-maven-central
and http://central.sonatype.org/pages/ossrh-guide.html
and http://www.scala-sbt.org/release/docs/Using-Sonatype.html
Using the SBT PGP v2 plugin that runs gpg locally (https://github.com/sbt/sbt-pgp)
- added to project/plugins.sbt:
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
- PGP keys were originally created using v1 plugin and pgp-cmd
Name: Chris Nappin
email: [email protected]
passphrase: Ia..
Public key is pubring.asc
Secret key is secring.asc
(Import secret key into default gpg keyring)
- then publish the public key:
pgp-cmd send-key [email protected] hkp://pool.sks-keyservers.net/
(command line said success, but sonatype or key search couldn't find it)
(manually uploaded contents from pubring.asc to https://a.keyserver.pki.scientia.net)
- add extra pom details needed for Sonatype (see build.sbt)
- created ~/.sbt/1.0/sonatype.sbt:
credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
"chrisnappin",
"..")
- run:
sbt + publishSigned
workflow
--------
make test/beta releases to maven central using a "a.b-SNAPHOTS" version number
- this uploads artifacts to the "snapshots" repo (Maven Central only includes "full" releases)
- snapshots can be published several times (immediately overwrites)
- run "sbt update" to explicitly refresh remote snapshot dependencies (otherwise it will try to cache locally)
make "full releases" using a regular version number (e.g. "a.b")
- this uploads artifacts to the "staging" repo
- releases cannot be published several times, have to be deleted first
?? then need to "drop"/"close" (delete release, try again later) or "release" (promote to maven central) the staging repository
- login to https://oss.sonatype.org (using sonatype user account above)
- click on Build Promotion -> Staging Repositories
- look for groupId without dots and with -nnnn suffix
- status should be "Open"
- can manually download and test it
- check contents includes all Scala versions
- can select the repo and click "Close" to trigger evaluation
(takes a couple of minutes)
- if fails, need to "Drop", resolve issues (see "Ruleset Evaluation Report") then redeploy to staging
- if successful, click "Release" to move staging repo to release repo
(first time you do this, need to update ticket to activate sync)
(sbt-sonatype plugin can be used to automate all of this - see https://github.com/xerial/sbt-sonatype)
- Maven central syncs to release repo, takes about 2 hours
- cannot update or delete artifacts from this point!
Then use Github Releases with changelog etc
Then update wiki with links to latest release