Skip to content

Commit

Permalink
replace version of plugins too
Browse files Browse the repository at this point in the history
  • Loading branch information
KengoTODA committed Oct 18, 2017
1 parent 9a1eef0 commit f29acc6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions RELEASE_PROCEDURE.md
Expand Up @@ -6,8 +6,7 @@ When you release fixed version of SpotBugs, please follow these procedures.

* `version` in `build.gradle` and `gradlePlugin/build.gradle`
* version number in `CHANGELOG.md` and `gradlePlugin/CHANGELOG.md`
* `version` and `full_version` in `docs/conf.py`
* version numbers in `docs/code-template/migration-findbugs-gradle-plugin.template`
* `version`, `full_version`, `maven_plugin_version` and `gradle_plugin_version` in `docs/conf.py`

## Release to Maven Central

Expand Down
@@ -1,5 +1,5 @@
plugins {
id 'com.github.spotbugs' version '1.5'
id 'com.github.spotbugs' version '|gradle-plugin|'
}
spotbugs {
toolVersion = '|release|'
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Expand Up @@ -17,7 +17,9 @@

html_context = {
'version' : '3.1',
'full_version' : '3.1.0-RC7'
'full_version' : '3.1.0-RC7',
'maven_plugin_version' : '3.1.0-RC6',
'gradle_plugin_version' : '1.5'
}

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
9 changes: 6 additions & 3 deletions docs/extensions/code-template.py
@@ -1,11 +1,14 @@
import os

def generate(release):
def generate(config):
release = config.release
maven = config.html_context['maven_plugin_version']
gradle = config.html_context['gradle_plugin_version']
for filename in os.listdir('code-template'):
with open('code-template/' + filename, 'r') as template:
data = template.read()
with open('generated/' + filename + '.inc', 'w') as generated:
generated.write(data.replace('|release|', release))
generated.write(data.replace('|release|', release).replace('|maven-plugin|', maven).replace('|gradle-plugin|', gradle))

def setup(app):
app.connect('builder-inited', lambda app: generate(app.config.release))
app.connect('builder-inited', lambda app: generate(app.config))

0 comments on commit f29acc6

Please sign in to comment.