66def SrcSteps():
69 'src_and_installation')
70
71 if not os.path.exists(builddir):
72 os.makedirs(builddir)
73 tarfilename = 'dart-%s.tar.gz' % version
74 tarfile = os.path.join(builddir, tarfilename)
75
76 print(
'Validating that we are on debian bullseye')
77 args = ['cat', '/etc/os-release']
78 (stdout, stderr, exitcode) = bot_utils.run(args)
79 if exitcode != 0:
80 print(
"Could not find linux system, exiting")
81 sys.exit(1)
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@")
85 sys.exit(1)
86
87 print(
'Building src tarball')
88 Run([
89 sys.executable, 'tools/linux_dist_support/create_tarball.py',
90 '--tar_filename', tarfile
91 ])
92
93 print(
'Building Debian packages')
94 Run([
95 sys.executable, 'tools/linux_dist_support/create_debian_packages.py',
96 '--tar_filename', tarfile, '--out_dir', builddir
97 ])
98
99 if os.path.exists('/usr/bin/dart') or os.path.exists(
100 '/usr/lib/dart/bin/dart'):
101 print(
"Dart already installed, removing")
102 UninstallDart()
103 TestInstallation(assume_installed=False)
104
105 InstallFromDep(builddir)
106 TestInstallation(assume_installed=True)
107
108
109
110 Run([
111 sys.executable, 'tools/build.py', '--mode=release', '--arch=x64',
112 'runtime'
113 ])
114
115
116 Run(['cp', '/usr/bin/dart', 'out/ReleaseX64/dart'])
117
118
120 test_file = CreateDartTestFile(temp_dir)
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])
124
125 UninstallDart()
126 TestInstallation(assume_installed=False)
127
128
GetVersion(no_git_hash=False, version_file=None, git_revision_file=None)