Skip to content

Commit

Permalink
GEOMESA-3398 Bundle documentation with CLI tools (#3188)
Browse files Browse the repository at this point in the history
  • Loading branch information
elahrvivaz authored Sep 20, 2024
1 parent 1081f29 commit 7e996ae
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
24 changes: 21 additions & 3 deletions build/scripts/do-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ if [[ ($# -ne 0) || ( $1 == "--help") || $1 == "-h" ]]; then
usage
fi

# reads a property out of the release.properties file generated by mvn release:prepare
# args: name of the property to read
readReleaseProp() {
grep "^$1=" release.properties | head -n1 | sed "s/$1=//"
}

# reads the main version out of the pom
# args: pom file to read from
readPomVersion() {
# the indentation only matches the top-level version tag
grep '^ <version>' "$1" | head -n1 | sed -E 's|.*<version>(.*)</version>.*|\1|'
}

Expand All @@ -41,10 +46,19 @@ if ! [[ $(java -version 2>&1 | head -n 1 | cut -d'"' -f2) =~ ^$JAVA_VERSION.* ]]
fi

if ! [[ $(which gpg) ]]; then
echo "Error: gpg executable not found"
echo "Error: gpg executable not found (required for signed release)"
exit 1
fi

if ! [[ $(which virtualenv) ]]; then
echo "Error: virtualenv executable not found (required for building docs)"
exit 1
fi

# configure virtualenv for building the docs
# shellcheck disable=SC1091
virtualenv .sphinx && source .sphinx/bin/activate && pip install -r docs/requirements.txt

# get current branch we're releasing off
BRANCH="$(git branch --show-current)"

Expand All @@ -64,6 +78,7 @@ for pom in pom.xml pom.xml.tag pom.xml.next; do
sed -i "s|<geomesa\.release\.version>.*|<geomesa.release.version>$RELEASE</geomesa.release.version>|" "$pom"
sed -i "s|<geomesa\.devel\.version>.*|<geomesa.devel.version>$NEXT</geomesa.devel.version>|" "$pom"
done
# regenerates the README
mvn clean install -pl .
git commit -am "Set version for release $RELEASE"

Expand All @@ -83,16 +98,19 @@ mvn release:clean
git checkout "$TAG"
mkdir -p "$RELEASE"

mvn clean deploy -Pcentral,python -DskipTests | tee build_2.12.log
mvn clean deploy -Pcentral,docs,python -DskipTests | tee build_2.12.log
copyReleaseArtifacts

./build/scripts/change-scala-version.sh 2.13
mvn clean deploy -Pcentral,python -DskipTests | tee build_2.13.log
mvn clean deploy -Pcentral,docs,python -DskipTests | tee build_2.13.log
copyReleaseArtifacts

# reset pom changes
./build/scripts/change-scala-version.sh 2.12

# exit virtualenv
deactivate

# push commits and tags
git checkout "$BRANCH"
git push lt "$BRANCH"
Expand Down
11 changes: 7 additions & 4 deletions geomesa-archetypes/geomesa-archetypes-binary-dist/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<exclude>org.locationtech.geomesa:geomesa-${tools.module}-spark*</exclude>
<exclude>org.locationtech.geomesa:geomesa-spark*</exclude>
<exclude>org.locationtech.geomesa:geomesa-process-wps*</exclude>
<exclude>org.locationtech.geomesa:docs</exclude>
<exclude>com.google.guava:guava</exclude>
</excludes>
</dependencySet>
Expand Down Expand Up @@ -88,7 +89,6 @@
<outputDirectory>conf</outputDirectory>
<directoryMode>755</directoryMode>
<fileMode>0644</fileMode>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>../geomesa-${tools.module}-tools/conf-filtered</directory>
Expand All @@ -115,7 +115,6 @@
<outputDirectory>conf</outputDirectory>
<directoryMode>755</directoryMode>
<fileMode>0644</fileMode>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>../../geomesa-tools/conf-filtered</directory>
Expand All @@ -129,14 +128,12 @@
<outputDirectory>examples</outputDirectory>
<directoryMode>755</directoryMode>
<fileMode>0644</fileMode>
<filtered>false</filtered>
</fileSet>
<fileSet>
<directory>../../geomesa-tools/examples</directory>
<outputDirectory>conf/sfts/examples</outputDirectory>
<directoryMode>755</directoryMode>
<fileMode>0644</fileMode>
<filtered>false</filtered>
<includes>
<include>**/application.conf</include>
</includes>
Expand All @@ -149,6 +146,12 @@
<exclude>*/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>../../docs/target/html</directory>
<outputDirectory>docs</outputDirectory>
<directoryMode>0700</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
</fileSets>

<files>
Expand Down
8 changes: 8 additions & 0 deletions geomesa-archetypes/geomesa-archetypes-binary-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
<artifactId>scala-compiler</artifactId>
<scope>provided</scope>
</dependency>

<!-- required for reactor ordering -->
<dependency>
<groupId>org.locationtech.geomesa</groupId>
<artifactId>docs</artifactId>
<version>${project.version}</version>
<type>pom</type>
</dependency>
</dependencies>

<build>
Expand Down

0 comments on commit 7e996ae

Please sign in to comment.