diff options
| author | jvoisin | 2017-10-13 16:49:56 +0200 |
|---|---|---|
| committer | jvoisin | 2017-10-13 16:49:56 +0200 |
| commit | bf9218ce7a1efb72244e58cc0663ef10a0c0029f (patch) | |
| tree | 378eab2e26cb844ab5530e0658df19ec3b86d90e | |
| parent | 780dcab62ebbf87aee8c65616fe0b0c57b2c8ea0 (diff) | |
Add more data to `phpinfo()`
- The version
- The git commit
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | src/php_snuffleupagus.h | 3 | ||||
| -rw-r--r-- | src/snuffleupagus.c | 4 |
3 files changed, 5 insertions, 3 deletions
| @@ -6,6 +6,7 @@ clean: ## clean everything | |||
| 6 | cd src; phpize --clean | 6 | cd src; phpize --clean |
| 7 | 7 | ||
| 8 | release: ## compile with releases flags | 8 | release: ## compile with releases flags |
| 9 | sed -i "s/#define PHP_SNUFFLEUPAGUS_COMMIT \"\"/#define PHP_SNUFFLEUPAGUS_COMMIT \"($$(git log --pretty=format:'%h' -n 1))\"/" ./src/php_snuffleupagus.h | ||
| 9 | cd src; phpize | 10 | cd src; phpize |
| 10 | cd src; ./configure --enable-snuffleupagus | 11 | cd src; ./configure --enable-snuffleupagus |
| 11 | make -C src | 12 | make -C src |
diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index bf2031b..c0790bc 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | #ifndef PHP_SNUFFLEUPAGUS_H | 1 | #ifndef PHP_SNUFFLEUPAGUS_H |
| 2 | #define PHP_SNUFFLEUPAGUS_H | 2 | #define PHP_SNUFFLEUPAGUS_H |
| 3 | 3 | ||
| 4 | #define PHP_SNUFFLEUPAGUS_VERSION "0.1" | 4 | #define PHP_SNUFFLEUPAGUS_COMMIT "" |
| 5 | #define PHP_SNUFFLEUPAGUS_VERSION "0.1 " PHP_SNUFFLEUPAGUS_COMMIT | ||
| 5 | #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" | 6 | #define PHP_SNUFFLEUPAGUS_EXTNAME "snuffleupagus" |
| 6 | #define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System" | 7 | #define PHP_SNUFFLEUPAGUS_AUTHOR "NBS System" |
| 7 | #define PHP_SNUFFLEUPAGUS_URL "https://github.com/nbs-system/snuffleupagus" | 8 | #define PHP_SNUFFLEUPAGUS_URL "https://github.com/nbs-system/snuffleupagus" |
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 02dd946..4f02065 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -145,9 +145,9 @@ PHP_RSHUTDOWN_FUNCTION(snuffleupagus) { return SUCCESS; } | |||
| 145 | 145 | ||
| 146 | PHP_MINFO_FUNCTION(snuffleupagus) { | 146 | PHP_MINFO_FUNCTION(snuffleupagus) { |
| 147 | php_info_print_table_start(); | 147 | php_info_print_table_start(); |
| 148 | php_info_print_table_header(2, "snuffleupagus support", "enabled"); | 148 | php_info_print_table_row(2, "snuffleupagus support", "enabled"); |
| 149 | php_info_print_table_row(2, "Version", PHP_SNUFFLEUPAGUS_VERSION); | ||
| 149 | php_info_print_table_end(); | 150 | php_info_print_table_end(); |
| 150 | |||
| 151 | DISPLAY_INI_ENTRIES(); | 151 | DISPLAY_INI_ENTRIES(); |
| 152 | } | 152 | } |
| 153 | 153 | ||
