Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,14 @@ updates:
- "junit:*"
- "org.mockito:*"
open-pull-requests-limit: 7
# Maven in /gtfs/pom.xml
- package-ecosystem: "maven"
directory: "/gtfs"
schedule:
interval: "weekly"
day: "wednesday"
time: "16:00"
timezone: "America/Montreal"
assignees:
- "montransit"
open-pull-requests-limit: 7
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
*.iml

# TOML Dependency updater file
*.updates.toml
*.updates.toml

# Gradle local caches and build outputs
shared/.gradle/
shared/build/
Binary file removed gtfs/gtfs-validator-8.0.0-cli.jar
Binary file not shown.
35 changes: 32 additions & 3 deletions gtfs/gtfs-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,38 @@ fi
# gh release list --limit 1 --repo github.com/MobilityData/gtfs-validator;
# echo "> GTFS Validator latest release... DONE";

JAR_FILE_PATTERN="$SCRIPT_DIR/gtfs-validator-*.jar";
JAR_FILES=($JAR_FILE_PATTERN);
JAR_FILE="${JAR_FILES[0]}";
VERSION_FILE="$SCRIPT_DIR/pom.xml";
if [ ! -f "$VERSION_FILE" ]; then
echo "> GTFS Validator version file '$VERSION_FILE' not found!";
exit 1;
fi
if ! command -v mvn >/dev/null 2>&1; then
echo "> Maven CLI is required to resolve GTFS Validator version!";
exit 1;
fi
GTFS_VALIDATOR_VERSION=$(mvn -q -f "$VERSION_FILE" help:evaluate -Dexpression=gtfs.validator.version -DforceStdout);
MVN_RESULT=$?;
if [[ ${MVN_RESULT} -ne 0 ]]; then
echo "> Error while resolving GTFS Validator version from '$VERSION_FILE'!";
exit ${MVN_RESULT};
fi
Comment thread
mmathieum marked this conversation as resolved.
Outdated
if [ -z "$GTFS_VALIDATOR_VERSION" ]; then
echo "> GTFS Validator version not found in '$VERSION_FILE'!";
exit 1;
fi
JAR_FILE="$SCRIPT_DIR/gtfs-validator-$GTFS_VALIDATOR_VERSION-cli.jar";
JAR_URL="https://github.com/MobilityData/gtfs-validator/releases/download/v$GTFS_VALIDATOR_VERSION/gtfs-validator-$GTFS_VALIDATOR_VERSION-cli.jar";
if [ ! -f "$JAR_FILE" ]; then
Comment thread
mmathieum marked this conversation as resolved.
Outdated
echo "> Downloading GTFS Validator '$GTFS_VALIDATOR_VERSION'...";
curl --fail --location --silent --show-error --output "$JAR_FILE" "$JAR_URL";
DOWNLOAD_RESULT=$?;
if [[ ${DOWNLOAD_RESULT} -ne 0 ]]; then
echo "> Error while downloading GTFS Validator '$GTFS_VALIDATOR_VERSION'!";
exit ${DOWNLOAD_RESULT};
fi
echo "> Downloading GTFS Validator '$GTFS_VALIDATOR_VERSION'... DONE";
fi
Comment thread
mmathieum marked this conversation as resolved.
echo "> GTFS Validator version: '$GTFS_VALIDATOR_VERSION'.";
echo "> GTFS Validator JAR file: '$JAR_FILE'.";

echo "> Launching GTFS Validator...";
Expand Down
22 changes: 22 additions & 0 deletions gtfs/pom.xml
Comment thread
mmathieum marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.mtransitapps.commons</groupId>
<artifactId>gtfs-validator-version</artifactId>
<version>1.0.0</version>

<properties>
<gtfs.validator.version>8.0.1</gtfs.validator.version>
</properties>

<dependencies>
<dependency>
<groupId>org.mobilitydata.gtfs-validator</groupId>
<artifactId>gtfs-validator-main</artifactId>
<version>${gtfs.validator.version}</version>
</dependency>
</dependencies>
</project>