Make WordPress Core

Changeset 26940


Ignore:
Timestamp:
01/13/2014 06:20:38 PM (11 years ago)
Author:
nacin
Message:

Update package.json. props TobiasBg. fixes #26629.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package.json

    r26610 r26940  
    11{
    22  "name": "WordPress",
    3   "version": "3.7.0",
     3  "version": "3.9.0",
    44  "description": "WordPress is web software you can use to create a beautiful website or blog.",
    55  "repository": {
  • trunk/tests/phpunit/tests/basic.php

    r26489 r26940  
    2828        list( $version ) = explode( '-', $GLOBALS['wp_version'] );
    2929        $this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." );
     30    }
     31
     32    function test_package_json() {
     33        $package_json = file_get_contents( dirname( ABSPATH ) . '/package.json' );
     34        $package_json = json_decode( $package_json, true );
     35        list( $version ) = explode( '-', $GLOBALS['wp_version'] );
     36        // package.json uses x.y.z, so fill cleaned $wp_version for .0 releases
     37        if ( 1 == substr_count( $version, '.' ) ) {
     38            $version .= '.0';
     39        }
     40        $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." );
    3041    }
    3142
Note: See TracChangeset for help on using the changeset viewer.