Skip to content

Commit

Permalink
Merge pull request #3 from spideyfusion/updates
Browse files Browse the repository at this point in the history
Minor updates
  • Loading branch information
spideyfusion authored Dec 4, 2018
2 parents 8321006 + 5df40af commit 0477e7c
Show file tree
Hide file tree
Showing 9 changed files with 609 additions and 248 deletions.
18 changes: 8 additions & 10 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Git repository
.git/

# Source files
src/
# CI
.travis.yml

# Scripts
script/
# Docker
.dockerignore
Dockerfile

# Documentation
*.md
*.txt
# Git
.git/
.gitignore
22 changes: 12 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ language: bash
services:
- docker

env:
- ES_VERSION=6.0.0
- ES_VERSION=5.6.4
addons:
apt:
packages:
- docker-ce

before_install:
# Install the latest version of Docker
- sudo apt-get update -qq
- sudo apt-get install -y docker-ce
env:
- ES_VERSION=6.5.1
- ES_VERSION=6.4.3
- ES_VERSION=6.3.2
- ES_VERSION=6.2.4
- ES_VERSION=6.1.4
- ES_VERSION=6.0.1
- ES_VERSION=5.6.13

install:
# Build and package the dictionary before testing
- script/build.sh

# Build the Docker image that we're going to use for testing
- docker build --build-arg ES_VERSION=${ES_VERSION} -t ${TRAVIS_REPO_SLUG} .

Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Changelog

## Release v2.3.0

* Updated the [krunose/hr-hunspell](https://github.com/krunose/hr-hunspell/blob/master/izmjene-u-rje%C4%8Dniku.md) dictionary to version 2.1.1 (2018-12-03).
* Simplified the Travis CI configuration and added more Elasticsearch testing targets.
* Migrated the entire build process to be inside the Docker image.
* Updated the test script to ensure compatibility with Elasticsearch 7.x and later.

## Release v2.2.0

* Added support for Elasticsearch 6.x versions. Any version older than 5.6 is no longer being tested against.
* Updated the [krunose/hr-hunspell](https://github.com/krunose/hr-hunspell/blob/master/izmjene-u-rje%C4%8Dniku.md) dictionary to version 2.1.2 (2017-11-17).
* Updated the [krunose/hr-hunspell](https://github.com/krunose/hr-hunspell/blob/master/izmjene-u-rje%C4%8Dniku.md) dictionary to version 2.1.1 (2017-11-17).
* Simplified the Docker installation steps inside Travis CI.
* Improved test script compatibility with Bash 4.x versions.

## Release v2.1.2

* Updated the [krunose/hr-hunspell](https://github.com/krunose/hr-hunspell/blob/master/izmjene-u-rje%C4%8Dniku.md) dictionary to version 2.1.2 (2017-10-11).
* Updated the [krunose/hr-hunspell](https://github.com/krunose/hr-hunspell/blob/master/izmjene-u-rje%C4%8Dniku.md) dictionary to version 2.1.1 (2017-10-11).
* Removed support for adding dictionary specific patches.

## Release v2.1.1
Expand Down
23 changes: 11 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
ARG ES_VERSION=6.0.0
ARG ES_VERSION=6.5.1

FROM docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}
FROM debian:stretch-slim AS build
LABEL maintainer="Petar Obradović <[email protected]>"

# We need to escalate our privilegies in order to install additional stuff
USER root
RUN apt-get update && \
apt-get install -y zip unzip

# For some reason, Elasticsearch images prior to version 6.x don't contain the "unzip" utility
RUN yum --disableplugin=fastestmirror -y install unzip
COPY . context/

# We don't want to run Elasticsearch as a root user!
USER elasticsearch
RUN cd context && \
script/build.sh \
mkdir .build/dist && \
unzip -d .build/dist .build/package.zip

COPY --chown=elasticsearch:elasticsearch .build/package.zip /tmp/package.zip
FROM docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}

RUN mkdir -p /usr/share/elasticsearch/config/hunspell/hr_HR && \
unzip -d /usr/share/elasticsearch/config/hunspell/hr_HR /tmp/package.zip && \
rm /tmp/package.zip
COPY --chown=elasticsearch:elasticsearch --from=build /context/.build/dist/ /usr/share/elasticsearch/config/hunspell/hr_HR/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Building is currently only supported on Linux platforms. You'll need the followi

## Installation

* Extract the [downloaded](https://github.com/spideyfusion/elasticsearch-croatian/releases/latest) or [built](#building) ZIP archive contents to `./hunspell/hr_HR/` (relative to Elasticsearch's configuration directory, usually `/etc/elasticsearch/`).
* Extract the [downloaded](https://github.com/spideyfusion/elasticsearch-croatian/releases/latest) or [built](#building) ZIP archive contents to `<path.conf>/hunspell/hr_HR/`. The configuration directory will be at a [different location](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#config-files-location) depending on how you installed Elasticsearch.
* If Elasticsearch is already running, restart it.

## Testing
Expand All @@ -32,7 +32,7 @@ To run tests you'll need to have [Docker](https://www.docker.com/) (**17.09+**),

* [Build](#building) the dictionary.
* Navigate to the root of the repository.
* Build the Docker image with `docker build --build-arg ES_VERSION=latest -t spideyfusion/elasticsearch-croatian .`.
* Build the Docker image with `docker build --build-arg ES_VERSION=6.5.1 -t spideyfusion/elasticsearch-croatian .`.
* Start the Docker container with `docker run --rm -p 9200:9200 spideyfusion/elasticsearch-croatian`.
* Run the tests by executing `script/test.sh`.

Expand Down
9 changes: 7 additions & 2 deletions README_hr_HR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ repository: https://www.github.com/krunose/hr-hunspell

### Autori i doprinositelji ###

Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l . c o m), 2016. - 2017.

Boris Juric, 2017. - 2018.

-----

Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l // c o m), 2016. - 2017.

-----

Krunoslav Šebetić (k r u n o . s e [ a t ] g m x . c o m), 2014. - 2017.
Krunoslav Šebetić (k r u n o . s e [ a t ] g m x // c o m), 2014. - 2018.

-----

Expand Down
Loading

0 comments on commit 0477e7c

Please sign in to comment.