#coding=UTF-8 import argparse, sys from urllib.request import urlopen parse = argparse.ArgumentParser(description="Check vaadin.com version lists") parse.add_argument("version", help="Released Vaadin version number") args = parse.parse_args() if hasattr(args, "echo"): print(args.echo) sys.exit(1) prerelease = None (major, minor, maintenance) = args.version.split(".", 2) if "." in maintenance: (maintenance, prerelease) = maintenance.split(".", 1) # Version without prerelease tag version = "%s.%s.%s" % (major, minor, maintenance) isPrerelease = prerelease is not None failed = False vaadin7Latest = "http://vaadin.com/download/LATEST7" vaadin7Versions = "http://vaadin.com/download/VERSIONS_7" vaadin6Latest = "http://vaadin.com/download/LATEST" vaadinPrerelease = "http://vaadin.com/download/PRERELEASES" try: latest = urlopen(vaadin7Latest).read().decode().split("\n") releaseRow = "release/%s.%s/%s" % (major, minor, version) assert (version in latest[0]) ^ isPrerelease, "Latest version mismatch. %s: %s, was: %s" % ("should not be" if isPrerelease else "should be", args.version, latest[0]) assert (releaseRow in latest[1]) ^ isPrerelease, "Release row mismatch; %s: %s, was %s" % ("should not be" if isPrerelease else "should be", releaseRow, latest[1]) except Exception as e: failed = True print("Latest version was not correctly updated: %s" % (e)) try: assert "%s," % (args.version) in urlopen(vaadin7Versions).read().decode().split("\n"), "Released version not in version list" except Exception as e: if isPrerelease: print("Prerelease version needs to be added manually to versions!") else: failed = True print(e) try: latest = urlopen(vaadin6Latest).read().decode().split("\n") releaseRow = "release/6.8/6.8." assert ("6.8." in latest[0]), "Latest version mismatch; should be: %sX, was: %s" % ("6.8.", latest[0]) assert (releaseRow in latest[1]), "Release row mismatch; should be: %sX, was %s" % (releaseRow, latest[1]) except Exception as e: failed = True print("Latest Vaadin 6 version was updated by release. %s" % (e)) try: latest = urlopen(vaadinPrerelease).read().decode().split("\n") assert (args.version in latest[0]) or not isPrerelease, "%s: %s, was: %s" % ("should be", args.version, latest[0]) except Exception as e: print("Prerelease file was not correctly updated: %s" % (e)) sys.exit(1 if failed else 0) >/package.json
blob: dd2ab35ff7eb01ceb7fdd39e14178a2ef5de748f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  "name": "SVG.js",
  "version": "1.0.0-rc.10",
  "description": "A lightweight library for manipulating and animating SVG.",
  "url": "http://svgjs.com",
  "homepage": "http://www.svgjs.com",
  "keywords": [
    "svg",
    "vector",
    "graphics",
    "animation"
  ],
  "author": "Wout Fierens <wout@impinc.co.uk>",
  "main": "dist/svg.js",
  "jam": {
    "include": [
      "dist/svg.js",
      "README.md",
      "LICENSE.txt"
    ]
  },
  "maintainers": [
    {
      "name": "Wout Fierens",
      "email": "wout@svgjs.com",
      "web": "http://svgjs.com"
    },
    {
      "name": "Alex Ewerlöf",
      "email": "alex@userpixel.com",
      "web": "http://www.ewerlof.name"
    }
  ],
  "licenses": [
    {
      "type": "MIT",
      "url": "http://www.opensource.org/licenses/mit-license.php"
    }
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/wout/svg.js.git"
  },
  "github": "https://github.com/wout/svg.js",
  "license": "MIT",
  "devDependencies": {
    "gulp": "^3.8.6",
    "gulp-clean": "^0.3.1",
    "gulp-concat": "^2.3.3",
    "gulp-gzip": "0.0.8",
    "gulp-header": "^1.0.5",
    "gulp-rename": "^1.2.0",
    "gulp-rimraf": "^0.1.0",
    "gulp-size": "^0.4.0",
    "gulp-uglify": "^0.3.1",
    "gulp-wrapper": "^0.1.42",
    "request": "^2.37.0"
  }
}