7Buildbot steps for src tarball generation and debian package generation
9Package up the src of the dart repo and create a debian package.
10Archive tarball and debian package to google cloud storage.
17sys.path.append(os.path.join(os.path.dirname(__file__),
'..',
'bots'))
20utils = bot_utils.GetUtils()
26 for entry
in os.listdir(builddir):
27 if entry.endswith(
"_amd64.deb"):
28 path = os.path.join(builddir, entry)
29 Run([
'dpkg',
'-i', path])
33 Run([
'dpkg',
'-r',
'dart'])
37 filename = os.path.join(tempdir,
'test.dart')
38 with open(filename,
'w')
as f:
39 f.write(
'void main() {\n')
40 f.write(
' print("Hello world");\n')
48 no_color_env = dict(os.environ)
49 no_color_env[
'TERM'] =
'nocolor'
50 subprocess.check_call(command, env=no_color_env)
54 paths = [
'/usr/bin/dart',
'/usr/lib/dart/bin/dart']
56 if os.path.exists(path):
57 if not assume_installed:
58 print(
'Assumed not installed, found %s' % path)
62 print(
'Assumed installed, but could not find %s' % path)
69 'src_and_installation')
71 if not os.path.exists(builddir):
73 tarfilename =
'dart-%s.tar.gz' % version
74 tarfile = os.path.join(builddir, tarfilename)
76 print(
'Validating that we are on debian bullseye')
77 args = [
'cat',
'/etc/os-release']
78 (stdout, stderr, exitcode) = bot_utils.run(args)
80 print(
"Could not find linux system, exiting")
82 if not "bullseye" in stdout:
83 print(
"Trying to build Debian bits but not on Debian Bullseye")
84 print(
"You can't fix this, please contact dart-engprod@")
87 print(
'Building src tarball')
89 sys.executable,
'tools/linux_dist_support/create_tarball.py',
90 '--tar_filename', tarfile
93 print(
'Building Debian packages')
95 sys.executable,
'tools/linux_dist_support/create_debian_packages.py',
96 '--tar_filename', tarfile,
'--out_dir', builddir
99 if os.path.exists(
'/usr/bin/dart')
or os.path.exists(
100 '/usr/lib/dart/bin/dart'):
101 print(
"Dart already installed, removing")
111 sys.executable,
'tools/build.py',
'--mode=release',
'--arch=x64',
116 Run([
'cp',
'/usr/bin/dart',
'out/ReleaseX64/dart'])
121 Run([
'/usr/lib/dart/bin/dart',
'compile',
'js', test_file])
122 Run([
'/usr/lib/dart/bin/dart',
'analyze', test_file])
123 Run([
'/usr/lib/dart/bin/dart', test_file])
129if __name__ ==
'__main__':
def CreateDartTestFile(tempdir)
def InstallFromDep(builddir)
def TestInstallation(assume_installed=True)
def print(*args, **kwargs)
def GetVersion(no_git_hash=False, version_file=None, git_revision_file=None)
static SkString join(const CommandLineFlags::StringArray &)