Skip to content

Commit 9e780fa

Browse files
committed
Update to elasticsearch 1.1.0 / Lucene 4.7.0
Create branches according to elasticsearch versions We create branches: * es-0.90 for elasticsearch 0.90 * es-1.0 for elasticsearch 1.0 * es-1.1 for elasticsearch 1.1 * master for elasticsearch master We also check that before releasing we don't have a dependency to an elasticsearch SNAPSHOT version. Add links to each version in documentation (cherry picked from commit 397e943)
1 parent 66be648 commit 9e780fa

File tree

3 files changed

+40
-8
lines changed

3 files changed

+40
-8
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ The Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis modul
55

66
In order to install the plugin, simply run: `bin/plugin -install elasticsearch/elasticsearch-analysis-smartcn/2.0.0`.
77

8-
* For 1.0.x elasticsearch versions, look at [master branch](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/tree/master).
9-
* For 0.90.x elasticsearch versions, look at [1.x branch](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/tree/1.x).
8+
* For master elasticsearch versions, look at [master branch](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/tree/master).
9+
* For 1.1.x elasticsearch versions, look at [es-1.1 branch](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/tree/es-1.1).
10+
* For 1.0.x elasticsearch versions, look at [es-1.0 branch](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/tree/es-1.0).
11+
* For 0.90.x elasticsearch versions, look at [es-0.90 branch](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/tree/es-0.90).
1012

1113
| Smart Chinese Analysis Plugin | elasticsearch | Release date |
1214
|-------------------------------|---------------------|:------------:|
13-
| 2.1.0-SNAPSHOT | 1.0.0.RC1 -> master | XXXX-XX-XX |
14-
| 2.0.0 | 1.0.0.RC1 -> master | 2014-02-28 |
15-
| 2.0.0.RC1 | 1.0.0.RC1 -> master | 2014-01-15 |
15+
| 3.0.0-SNAPSHOT | master | XXXX-XX-XX |
1616

17+
Please read documentation relative to the version you are using:
18+
19+
* [3.0.0-SNAPSHOT](https://github.com/elasticsearch/elasticsearch-analysis-smartcn/blob/master/README.md)
1720

1821
The plugin includes the `smart_chinese` analyzer, `smartcn_sentence` tokenizer, and `smartcn_word` token filter.
1922

dev-tools/build_release.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,29 @@ def callback(line):
208208
return line
209209
process_file(readme_file, callback)
210210

211+
# Moves the README.md file from a snapshot to a release (documentation link)
212+
def remove_documentation_snapshot(readme_file, repo_url, release, branch):
213+
pattern = '* [%s-SNAPSHOT](%sblob/%s/README.md)' % (release, repo_url, branch)
214+
replacement = '* [%s](%sblob/v%s/README.md)' % (release, repo_url, release)
215+
def callback(line):
216+
# If we find pattern, we replace its content
217+
if line.find(pattern) >= 0:
218+
return line.replace(pattern, replacement)
219+
else:
220+
return line
221+
process_file(readme_file, callback)
222+
223+
# Add in README.markdown file the documentation for the next version
224+
def add_documentation_snapshot(readme_file, repo_url, release, snapshot, branch):
225+
pattern = '* [%s](%sblob/v%s/README.md)' % (release, repo_url, release)
226+
replacement = '* [%s-SNAPSHOT](%sblob/%s/README.md)' % (snapshot, repo_url, branch)
227+
def callback(line):
228+
# If we find pattern, we copy the line and replace its content
229+
if line.find(pattern) >= 0:
230+
return line.replace(pattern, replacement)+line
231+
else:
232+
return line
233+
process_file(readme_file, callback)
211234

212235
# Set release date in README.md file
213236
def set_date(readme_file):
@@ -603,8 +626,12 @@ def check_email_settings():
603626
artifact_name = find_from_pom('name')
604627
artifact_description = find_from_pom('description')
605628
project_url = find_from_pom('url')
629+
elasticsearch_version = find_from_pom('elasticsearch.version')
606630
print(' Artifact Id: [%s]' % artifact_id)
607631
print(' Release version: [%s]' % release_version)
632+
print(' Elasticsearch: [%s]' % elasticsearch_version)
633+
if elasticsearch_version.find('-SNAPSHOT') != -1:
634+
raise RuntimeError('Can not release with a SNAPSHOT elasticsearch dependency: %s' % elasticsearch_version)
608635

609636
# extract snapshot
610637
default_snapshot_version = guess_snapshot(release_version)
@@ -626,6 +653,7 @@ def check_email_settings():
626653
try:
627654
pending_files = [POM_FILE, README_FILE]
628655
remove_maven_snapshot(POM_FILE, release_version)
656+
remove_documentation_snapshot(README_FILE, project_url, release_version, src_branch)
629657
remove_version_snapshot(README_FILE, release_version)
630658
set_date(README_FILE)
631659
set_install_instructions(README_FILE, artifact_id, release_version)
@@ -657,6 +685,7 @@ def check_email_settings():
657685

658686
add_maven_snapshot(POM_FILE, release_version, snapshot_version)
659687
add_version_snapshot(README_FILE, release_version, snapshot_version)
688+
add_documentation_snapshot(README_FILE, project_url, release_version, snapshot_version, src_branch)
660689
add_pending_files(*pending_files)
661690
commit_snapshot()
662691

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.elasticsearch</groupId>
77
<artifactId>elasticsearch-analysis-smartcn</artifactId>
8-
<version>2.1.0-SNAPSHOT</version>
8+
<version>3.0.0-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010
<name>Elasticsearch Smart Chinese Analysis plugin</name>
1111
<description>Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.</description>
@@ -32,8 +32,8 @@
3232
</parent>
3333

3434
<properties>
35-
<elasticsearch.version>1.0.0</elasticsearch.version>
36-
<lucene.version>4.6.1</lucene.version>
35+
<elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version>
36+
<lucene.version>4.7.0</lucene.version>
3737
<tests.jvms>1</tests.jvms>
3838
<tests.shuffle>true</tests.shuffle>
3939
<tests.output>onerror</tests.output>

0 commit comments

Comments
 (0)