Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
libraries
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
libraries
Commits
c5515bd1
Commit
c5515bd1
authored
13 years ago
by
Tobias Zimmermann
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1323530
by tstoeckler: Document libraries_get_version() pattern matching.
parent
256d7c10
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
libraries.api.php
+4
-1
4 additions, 1 deletion
libraries.api.php
libraries.module
+4
-1
4 additions, 1 deletion
libraries.module
with
9 additions
and
2 deletions
CHANGELOG.txt
+
1
−
0
View file @
c5515bd1
Libraries 7.x-2.x, xxxx-xx-xx
Libraries 7.x-2.x, xxxx-xx-xx
-----------------------------
-----------------------------
#1323530 by tstoeckler: Document libraries_get_version() pattern matching.
#1325524 by sun, Rob Loach, tstoeckler: Statically cache libraries_detect().
#1325524 by sun, Rob Loach, tstoeckler: Statically cache libraries_detect().
#1321372 by Rob Loach: Provide a 'post-load' callback group.
#1321372 by Rob Loach: Provide a 'post-load' callback group.
#1205854 by tstoeckler, sun: Test library caching.
#1205854 by tstoeckler, sun: Test library caching.
...
...
This diff is collapsed.
Click to expand it.
libraries.api.php
+
4
−
1
View file @
c5515bd1
...
@@ -51,7 +51,10 @@
...
@@ -51,7 +51,10 @@
* - file: The filename to parse for the version, relative to the library
* - file: The filename to parse for the version, relative to the library
* path. For example: 'docs/changelog.txt'.
* path. For example: 'docs/changelog.txt'.
* - pattern: A string containing a regular expression (PCRE) to match the
* - pattern: A string containing a regular expression (PCRE) to match the
* library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'.
* library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'. Note
* that the returned version is not the match of the entire pattern (i.e.
* '@version 1.2.3' in the above example) but the match of the first
* sub-pattern (i.e. '1.2.3' in the above example).
* - lines: (optional) The maximum number of lines to search the pattern in.
* - lines: (optional) The maximum number of lines to search the pattern in.
* Defaults to 20.
* Defaults to 20.
* - cols: (optional) The maximum number of characters per line to take into
* - cols: (optional) The maximum number of characters per line to take into
...
...
This diff is collapsed.
Click to expand it.
libraries.module
+
4
−
1
View file @
c5515bd1
...
@@ -703,7 +703,10 @@ function libraries_load_files($library) {
...
@@ -703,7 +703,10 @@ function libraries_load_files($library) {
* - file: The filename to parse for the version, relative to the library
* - file: The filename to parse for the version, relative to the library
* path. For example: 'docs/changelog.txt'.
* path. For example: 'docs/changelog.txt'.
* - pattern: A string containing a regular expression (PCRE) to match the
* - pattern: A string containing a regular expression (PCRE) to match the
* library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'.
* library version. For example: '@version\s+([0-9a-zA-Z\.-]+)@'. Note that
* the returned version is not the match of the entire pattern (i.e.
* '@version 1.2.3' in the above example) but the match of the first
* sub-pattern (i.e. '1.2.3' in the above example).
* - lines: (optional) The maximum number of lines to search the pattern in.
* - lines: (optional) The maximum number of lines to search the pattern in.
* Defaults to 20.
* Defaults to 20.
* - cols: (optional) The maximum number of characters per line to take into
* - cols: (optional) The maximum number of characters per line to take into
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment