Improve Android OpenPGP, drafts and release builds
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,8 @@ const packageJson = JSON.parse(fs.readFileSync(path.join(root, 'package.json'),
|
||||
const packageLock = JSON.parse(fs.readFileSync(path.join(root, 'package-lock.json'), 'utf8'));
|
||||
const androidBuild = fs.readFileSync(path.join(root, 'android', 'app', 'build.gradle'), 'utf8');
|
||||
const buildAll = fs.readFileSync(path.join(root, 'scripts', 'build-all.ps1'), 'utf8');
|
||||
const build = fs.readFileSync(path.join(root, 'scripts', 'build.ps1'), 'utf8');
|
||||
const linuxBuild = fs.readFileSync(path.join(root, 'scripts', 'build-linux-wsl.sh'), 'utf8');
|
||||
const androidDebugScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-apk.cjs'), 'utf8');
|
||||
const androidReleaseScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-release-apk.cjs'), 'utf8');
|
||||
const desktopWorkflow = fs.readFileSync(path.join(root, '.github', 'workflows', 'desktop-build.yml'), 'utf8');
|
||||
@@ -34,10 +36,27 @@ test('Android version name and code derive from the canonical package version',
|
||||
|
||||
test('release scripts and desktop artifact labels use package.json version', () => {
|
||||
assert.match(buildAll, /package\.json/);
|
||||
assert.match(build, /package\.json/);
|
||||
assert.match(desktopWorkflow, /require\('\.\/package\.json'\)\.version/);
|
||||
assert.match(desktopWorkflow, /-v\$\{\{ steps\.app-version\.outputs\.version \}\}/);
|
||||
});
|
||||
|
||||
test('build scripts retain the basic targets and add the Windows installer and isolated WSL builds', () => {
|
||||
assert.match(build, /npm run android:apk/);
|
||||
assert.match(build, /npm run dist:win:portable/);
|
||||
assert.match(buildAll, /build\.ps1/);
|
||||
assert.match(buildAll, /npm run dist:win:installer/);
|
||||
assert.match(buildAll, /--distribution/);
|
||||
assert.match(buildAll, /build-linux-wsl\.sh/);
|
||||
assert.match(linuxBuild, /mktemp -d/);
|
||||
assert.match(linuxBuild, /--exclude='\.\/node_modules'/);
|
||||
assert.match(linuxBuild, /npm ci/);
|
||||
assert.match(linuxBuild, /npm run dist:linux/);
|
||||
assert.match(linuxBuild, /appimages=/);
|
||||
assert.match(linuxBuild, /debs=/);
|
||||
assert.doesNotMatch(linuxBuild, /\r/);
|
||||
});
|
||||
|
||||
test('Android debug APK is labeled as debug and release APK requires signing credentials', () => {
|
||||
assert.match(androidDebugScript, /assembleDebug/);
|
||||
assert.match(androidDebugScript, /ep-mail \$\{version\}-debug\.apk/);
|
||||
|
||||
Reference in New Issue
Block a user