This repository was archived by the owner on Jun 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +56
-7
lines changed Expand file tree Collapse file tree 5 files changed +56
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Verify plugin version
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ verify-version :
11+ name : Verify plugin version
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Extract version from "load.php"
17+ id : load_version
18+ run : |
19+ VERSION=$(grep "Version:" load.php | sed "s/.*Version: \([^ ]*\).*/\1/")
20+ echo "load_version=$VERSION" >> $GITHUB_OUTPUT
21+
22+ - name : Extract version from "version.php"
23+ id : const_version
24+ run : |
25+ VERSION=$(php -r "require 'version.php'; echo SQLITE_DRIVER_VERSION;")
26+ echo "const_version=$VERSION" >> $GITHUB_OUTPUT
27+
28+ - name : Compare versions
29+ run : |
30+ if [ "${{ steps.load_version.outputs.load_version }}" != "${{ steps.const_version.outputs.const_version }}" ]; then
31+ echo "Version mismatch detected!"
32+ echo " load.php version: ${{ steps.load_version.outputs.load_version }}"
33+ echo " version.php constant: ${{ steps.const_version.outputs.const_version }}"
34+ exit 1
35+ fi
Original file line number Diff line number Diff line change 1212 * @package wp-sqlite-integration
1313 */
1414
15- define ( 'SQLITE_DRIVER_VERSION ' , '2.1.17-alpha ' );
15+ /**
16+ * Load the "SQLITE_DRIVER_VERSION" constant.
17+ * This constant needs to be updated whenever the plugin version changes!
18+ */
19+ require_once __DIR__ . '/version.php ' ;
20+
1621define ( 'SQLITE_MAIN_FILE ' , __FILE__ );
1722
1823require_once __DIR__ . '/php-polyfills.php ' ;
Original file line number Diff line number Diff line change 11<?php
22
33require_once __DIR__ . '/wp-sqlite-schema.php ' ;
4+ require_once __DIR__ . '/../version.php ' ;
45require_once __DIR__ . '/../wp-includes/parser/class-wp-parser-grammar.php ' ;
56require_once __DIR__ . '/../wp-includes/parser/class-wp-parser.php ' ;
67require_once __DIR__ . '/../wp-includes/parser/class-wp-parser-node.php ' ;
1415require_once __DIR__ . '/../wp-includes/sqlite/class-wp-sqlite-pdo-user-defined-functions.php ' ;
1516require_once __DIR__ . '/../wp-includes/sqlite/class-wp-sqlite-translator.php ' ;
1617
17- /*
18- * The driver version needs to be defined and set to anything other than "0.0.0"
19- * for the tests, so that the information schema and other tables are created.
20- */
21- define ( 'SQLITE_DRIVER_VERSION ' , '2.0.0-tests ' );
22-
2318/**
2419 * Polyfills for WordPress functions
2520 */
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * The version of the SQLite driver.
5+ *
6+ * This constant needs to be updated whenever the plugin version changes!
7+ */
8+ define ( 'SQLITE_DRIVER_VERSION ' , '2.1.17-alpha ' );
Original file line number Diff line number Diff line change 66 * @since 1.0.0
77 */
88
9+ /**
10+ * Load the "SQLITE_DRIVER_VERSION" constant.
11+ * This constant needs to be updated whenever the plugin version changes!
12+ */
13+ require_once dirname ( __DIR__ , 2 ) . '/version.php ' ;
14+
915// Require the constants file.
1016require_once dirname ( __DIR__ , 2 ) . '/constants.php ' ;
1117
You can’t perform that action at this time.
0 commit comments