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 12
12
* @package wp-sqlite-integration
13
13
*/
14
14
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
+
16
21
define ( 'SQLITE_MAIN_FILE ' , __FILE__ );
17
22
18
23
require_once __DIR__ . '/php-polyfills.php ' ;
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
require_once __DIR__ . '/wp-sqlite-schema.php ' ;
4
+ require_once __DIR__ . '/../version.php ' ;
4
5
require_once __DIR__ . '/../wp-includes/parser/class-wp-parser-grammar.php ' ;
5
6
require_once __DIR__ . '/../wp-includes/parser/class-wp-parser.php ' ;
6
7
require_once __DIR__ . '/../wp-includes/parser/class-wp-parser-node.php ' ;
14
15
require_once __DIR__ . '/../wp-includes/sqlite/class-wp-sqlite-pdo-user-defined-functions.php ' ;
15
16
require_once __DIR__ . '/../wp-includes/sqlite/class-wp-sqlite-translator.php ' ;
16
17
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
-
23
18
/**
24
19
* Polyfills for WordPress functions
25
20
*/
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 6
6
* @since 1.0.0
7
7
*/
8
8
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
+
9
15
// Require the constants file.
10
16
require_once dirname ( __DIR__ , 2 ) . '/constants.php ' ;
11
17
You can’t perform that action at this time.
0 commit comments