version.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. "use strict";
  2. // Copyright 2012-14 United States Government, as represented by the Secretary of Defense, Under
  3. // Secretary of Defense (Personnel & Readiness).
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  6. // in compliance with the License. You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software distributed under the License
  11. // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  12. // or implied. See the License for the specific language governing permissions and limitations under
  13. // the License.
  14. /// @module version
  15. define( function() {
  16. /// The version identifier has the following form:
  17. ///
  18. /// major, minor, patch, release, build
  19. ///
  20. /// Fields are defined according to [SemVer](http://semver.org). The `release` and `build`
  21. /// fields are optional, but they are given low-precedence values by default so that official
  22. /// builds will always have a higher precedence than unofficial builds. The build tool removes
  23. /// these fields when appropriate.
  24. ///
  25. /// The build tool overwrites the version identifier on the following line, and it isn't
  26. /// particuarly clever about it. Take care to keep the comment and formatting intact when
  27. /// bumping the version number.
  28. var version = [ 0, 8, 0, "development", "" ]; // version-identifier
  29. /// Render the version identifier as a SemVer-style string.
  30. version.toString = function() {
  31. return this.slice( 0, 3 ).join( "." ) +
  32. ( this[ 3 ] ? "-" + this[ 3 ] : "" ) +
  33. ( this[ 4 ] ? "+" + this[ 4 ] : "" );
  34. };
  35. return version;
  36. } );