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
This commit is contained in:
parent
d76bdb12da
commit
2c18d35b59
14
README.md
14
README.md
|
@ -5,14 +5,18 @@ The Python (jython) language plugin allows to have `python` as the language of s
|
|||
|
||||
In order to install the plugin, simply run: `bin/plugin -install elasticsearch/elasticsearch-lang-python/2.0.0`.
|
||||
|
||||
* For 1.0.x elasticsearch versions, look at [master branch](https://github.com/elasticsearch/elasticsearch-lang-python/tree/master).
|
||||
* For 0.90.x elasticsearch versions, look at [1.x branch](https://github.com/elasticsearch/elasticsearch-lang-python/tree/1.x).
|
||||
* For master elasticsearch versions, look at [master branch](https://github.com/elasticsearch/elasticsearch-lang-python/tree/master).
|
||||
* For 1.1.x elasticsearch versions, look at [es-1.1 branch](https://github.com/elasticsearch/elasticsearch-lang-python/tree/es-1.1).
|
||||
* For 1.0.x elasticsearch versions, look at [es-1.0 branch](https://github.com/elasticsearch/elasticsearch-lang-python/tree/es-1.0).
|
||||
* For 0.90.x elasticsearch versions, look at [es-0.90 branch](https://github.com/elasticsearch/elasticsearch-lang-python/tree/es-0.90).
|
||||
|
||||
| Python Lang Plugin | elasticsearch | jython | Release date |
|
||||
|-----------------------------|---------------------|----------|:------------:|
|
||||
| 2.1.0-SNAPSHOT | 1.0.0.RC1 -> master | 2.5.3 | XXXX-XX-XX |
|
||||
| 2.0.0 | 1.0.0.RC1 -> master | 2.5.3 | 2014-03-07 |
|
||||
| 2.0.0.RC1 | 1.0.0.RC1 -> master | 2.5.3 | 2014-01-15 |
|
||||
| 3.0.0-SNAPSHOT | master | 2.5.3 | XXXX-XX-XX |
|
||||
|
||||
Please read documentation relative to the version you are using:
|
||||
|
||||
* [3.0.0-SNAPSHOT](https://github.com/elasticsearch/elasticsearch-lang-python/blob/master/README.md)
|
||||
|
||||
Using python with function_score
|
||||
--------------------------------
|
||||
|
|
|
@ -208,6 +208,29 @@ def add_version_snapshot(readme_file, release, snapshot):
|
|||
return line
|
||||
process_file(readme_file, callback)
|
||||
|
||||
# Moves the README.md file from a snapshot to a release (documentation link)
|
||||
def remove_documentation_snapshot(readme_file, repo_url, release, branch):
|
||||
pattern = '* [%s-SNAPSHOT](%sblob/%s/README.md)' % (release, repo_url, branch)
|
||||
replacement = '* [%s](%sblob/v%s/README.md)' % (release, repo_url, release)
|
||||
def callback(line):
|
||||
# If we find pattern, we replace its content
|
||||
if line.find(pattern) >= 0:
|
||||
return line.replace(pattern, replacement)
|
||||
else:
|
||||
return line
|
||||
process_file(readme_file, callback)
|
||||
|
||||
# Add in README.markdown file the documentation for the next version
|
||||
def add_documentation_snapshot(readme_file, repo_url, release, snapshot, branch):
|
||||
pattern = '* [%s](%sblob/v%s/README.md)' % (release, repo_url, release)
|
||||
replacement = '* [%s-SNAPSHOT](%sblob/%s/README.md)' % (snapshot, repo_url, branch)
|
||||
def callback(line):
|
||||
# If we find pattern, we copy the line and replace its content
|
||||
if line.find(pattern) >= 0:
|
||||
return line.replace(pattern, replacement)+line
|
||||
else:
|
||||
return line
|
||||
process_file(readme_file, callback)
|
||||
|
||||
# Set release date in README.md file
|
||||
def set_date(readme_file):
|
||||
|
@ -603,8 +626,12 @@ if __name__ == '__main__':
|
|||
artifact_name = find_from_pom('name')
|
||||
artifact_description = find_from_pom('description')
|
||||
project_url = find_from_pom('url')
|
||||
elasticsearch_version = find_from_pom('elasticsearch.version')
|
||||
print(' Artifact Id: [%s]' % artifact_id)
|
||||
print(' Release version: [%s]' % release_version)
|
||||
print(' Elasticsearch: [%s]' % elasticsearch_version)
|
||||
if elasticsearch_version.find('-SNAPSHOT') != -1:
|
||||
raise RuntimeError('Can not release with a SNAPSHOT elasticsearch dependency: %s' % elasticsearch_version)
|
||||
|
||||
# extract snapshot
|
||||
default_snapshot_version = guess_snapshot(release_version)
|
||||
|
@ -626,6 +653,7 @@ if __name__ == '__main__':
|
|||
try:
|
||||
pending_files = [POM_FILE, README_FILE]
|
||||
remove_maven_snapshot(POM_FILE, release_version)
|
||||
remove_documentation_snapshot(README_FILE, project_url, release_version, src_branch)
|
||||
remove_version_snapshot(README_FILE, release_version)
|
||||
set_date(README_FILE)
|
||||
set_install_instructions(README_FILE, artifact_id, release_version)
|
||||
|
@ -657,6 +685,7 @@ if __name__ == '__main__':
|
|||
|
||||
add_maven_snapshot(POM_FILE, release_version, snapshot_version)
|
||||
add_version_snapshot(README_FILE, release_version, snapshot_version)
|
||||
add_documentation_snapshot(README_FILE, project_url, release_version, snapshot_version, src_branch)
|
||||
add_pending_files(*pending_files)
|
||||
commit_snapshot()
|
||||
|
||||
|
|
6
pom.xml
6
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-lang-python</artifactId>
|
||||
<version>2.1.0-SNAPSHOT</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>Elasticsearch Python language plugin</name>
|
||||
<description>The Python language plugin allows to have python as the language of scripts to execute.</description>
|
||||
|
@ -31,8 +31,8 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<elasticsearch.version>1.0.0</elasticsearch.version>
|
||||
<lucene.version>4.6.1</lucene.version>
|
||||
<elasticsearch.version>2.0.0-SNAPSHOT</elasticsearch.version>
|
||||
<lucene.version>4.7.0</lucene.version>
|
||||
<tests.jvms>1</tests.jvms>
|
||||
<tests.shuffle>true</tests.shuffle>
|
||||
<tests.output>onerror</tests.output>
|
||||
|
|
|
@ -54,7 +54,6 @@ public class PythonScriptSearchTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testPythonFilter() throws Exception {
|
||||
wipeIndices("test");
|
||||
createIndex("test");
|
||||
index("test", "type1", "1", jsonBuilder().startObject().field("test", "value beck").field("num1", 1.0f).endObject());
|
||||
flush();
|
||||
|
@ -105,7 +104,6 @@ public class PythonScriptSearchTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testScriptFieldUsingSource() throws Exception {
|
||||
wipeIndices("test");
|
||||
createIndex("test");
|
||||
index("test", "type1", "1",
|
||||
jsonBuilder().startObject()
|
||||
|
@ -140,7 +138,6 @@ public class PythonScriptSearchTests extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testCustomScriptBoost() throws Exception {
|
||||
wipeIndices("test");
|
||||
createIndex("test");
|
||||
index("test", "type1", "1", jsonBuilder().startObject().field("test", "value beck").field("num1", 1.0f).endObject());
|
||||
index("test", "type1", "2", jsonBuilder().startObject().field("test", "value beck").field("num1", 2.0f).endObject());
|
||||
|
@ -215,7 +212,6 @@ public class PythonScriptSearchTests extends ElasticsearchIntegrationTest {
|
|||
*/
|
||||
@Test
|
||||
public void testPythonEmptyParameters() throws Exception {
|
||||
wipeIndices("test");
|
||||
createIndex("test");
|
||||
index("test", "type1", "1", jsonBuilder().startObject().field("myfield", "foo").endObject());
|
||||
refresh();
|
||||
|
|
Loading…
Reference in New Issue