Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
run: ./build.sh

- name: AppInspect
run: precious lint --command appinspect geoip-1.1.0.tar.gz
run: precious lint --command appinspect geoip-1.1.1.tar.gz
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changelog

## 1.1.1
## 1.1.1 (2026-06-23)

* Declare the `interval`, `disabled`, and `run_only_one` settings in the
`geoipupdate_input` modular input's `inputs.conf.spec` so the input's
supported parameters are documented in the spec file.
supported parameters are documented in the spec file. This is to see if
including `run_only_one` will make the database update modular input run
on all search heads in a search head cluster.

## 1.1.0 (2026-04-01)

Expand Down
8 changes: 8 additions & 0 deletions README.dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
How to release:

* Set a date in the changelog and commit
* Run dev-bin/release.sh
* dev-bin/release.sh should create the tarball e.g. geoip-1.2.3.tar.gz
* Create a new release on Splunkbase using the tarball
* Remember to set the release visible and as the default version in
Splunkbase
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu -o pipefail

rm -rf output *.tar.gz
find geoip/package -type d -name "__pycache__" -prune -exec rm -rf {} +
uv run -- ucc-gen build --source geoip/package --ta-version 1.1.0
uv run -- ucc-gen build --source geoip/package --ta-version 1.1.1

# Clean up pip-installed files that AppInspect doesn't like
# - .hash directories from aiohttp (Cython build artifacts)
Expand Down
37 changes: 32 additions & 5 deletions dev-bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ check_command() {
fi
}

# Substitute the version in $file using the given perl regex. Aborts if the
# regex matched nothing, so a broken pattern can't silently leave a stale
# version behind.
replace_version() {
local file=$1
local regex=$2
VERSION=$version perl -i -pe '
$count += s/'"$regex"'/$ENV{VERSION}/g;
END { $count or die "'"$file"': version substitution matched nothing\n" }
' "$file"
}

# Verify gh CLI is authenticated
if ! gh auth status &>/dev/null; then
echo "Error: gh CLI is not authenticated. Run 'gh auth login' first."
Expand Down Expand Up @@ -75,19 +87,34 @@ if [[ "$date" != "$(date +"%Y-%m-%d")" ]]; then
fi

tag="v$version"
tarball="geoip-$version.tar.gz"

if [ -n "$(git status --porcelain)" ]; then
echo ". is not clean." >&2
exit 1
fi

# Update versions in globalConfig.json and pyproject.toml
perl -pi -e "s/(?<="version": \").+?(?=\")/$version/gsm" geoip/globalConfig.json
perl -pi -e "s/(?<=^version = \").+?(?=\")/$version/gsm" pyproject.toml
# Update versions in the repo
replace_version geoip/globalConfig.json '(?<="version": ").+?(?=")'
replace_version pyproject.toml '(?<=^version = ").+?(?=")'
replace_version geoip/package/app.manifest '(?<="version": ").+?(?=")'
replace_version build.sh '(?<=--ta-version )\S+'
replace_version .github/workflows/lint.yml '(?<=geoip-).+?(?=\.tar\.gz)'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using .+? in the regular expression is very generic and can lead to accidental matches if there are other files or strings in .github/workflows/lint.yml that start with geoip- and end with .tar.gz (for example, geoip-utils-1.0.0.tar.gz).\n\nConsider using a more specific pattern that only matches version strings (e.g., digits, dots, and optional pre-release characters).

Suggested change
replace_version .github/workflows/lint.yml '(?<=geoip-).+?(?=\.tar\.gz)'
replace_version .github/workflows/lint.yml '(?<=geoip-)[0-9a-zA-Z.-]+(?=\.tar\.gz)'


echo "Test results:"
uv run pytest tests

# Build the tarball now so a build failure aborts before we commit, and so it
# is ready to attach to the release (we use immutable releases, so assets
# cannot be added after the fact).
echo $'\nBuilding package:'
./build.sh

if [ ! -f "$tarball" ]; then
echo "Expected $tarball was not produced by build.sh" >&2
exit 1
fi

echo $'\nDiff:'
git diff

Expand All @@ -103,6 +130,6 @@ fi

git commit -m "Update for $tag" -a

git push
git push -u origin HEAD

gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag"
gh release create --target "$(git branch --show-current)" -t "$version" -n "$notes" "$tag" "$tarball"
2 changes: 1 addition & 1 deletion geoip/globalConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"meta": {
"name": "geoip",
"restRoot": "geoip",
"version": "1.1.0",
"version": "1.1.1",
"displayName": "MaxMind GeoIP App",
"schemaVersion": "0.0.10",
"supportedThemes": [
Expand Down
2 changes: 1 addition & 1 deletion geoip/package/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"group": null,
"name": "geoip",
"version": "1.1.0"
"version": "1.1.1"
},
"author": [
{
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "maxmind-splunk-app"
version = "1.1.0"
version = "1.1.1"
description = "MaxMind database lookups in Splunk"
readme = "README.md"
license = "Apache-2.0 OR MIT"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading