Push to play store last in deploy.mjs - 2.12 🚀

This commit is contained in:
Brandon Presley 2024-02-08 20:58:57 +13:00
parent 07c704841d
commit 15557d1a02
3 changed files with 19 additions and 14 deletions

View File

@ -85,8 +85,8 @@ android {
applicationId "com.massive"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 36226
versionName "2.11"
versionCode 36227
versionName "2.12"
}
signingConfigs {
release {

View File

@ -29,16 +29,21 @@ let packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
packageJson.version = versionName;
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
const git = simpleGit();
await git.add([packageJsonPath, buildFilePath]);
await git.log(['-1']).then(log => {
const lastCommitMessage = log.latest.message;
const newCommitMessage = lastCommitMessage + ` - ${versionName} 🚀`;
return git.commit(newCommitMessage, [], ['--amend']);
}).then(() => {
return git.addTag(versionCode.toString());
}).then(() => {
return git.push('origin', 'HEAD', ['--tags']);
}).catch(err => {
console.error('Error amending commit:', err);
});
const isWindows = os.platform() === 'win32';
execSync(isWindows ? '.\\gradlew.bat bundleRelease' : './gradlew bundleRelease', { stdio: 'inherit' });
execSync('bundle install', { stdio: 'inherit' });
execSync('bundle exec fastlane supply --aab app/build/outputs/bundle/release/app-release.aab', { stdio: 'inherit' });
const git = simpleGit();
git.log(['-1']).then(log => {
const lastCommitMessage = log.latest.message;
const newCommitMessage = lastCommitMessage + ` - ${versionName} 🚀`;
return git.commit(newCommitMessage, [buildFilePath, packageJsonPath]);
}).then(() => git.addTag(versionCode.toString()))
.then(() => git.push('origin', 'HEAD'))
.then(() => git.pushTags('origin'));
execSync('bundle exec fastlane supply --aab app/build/outputs/bundle/release/app-release.aab', { stdio: 'inherit' });

View File

@ -1,6 +1,6 @@
{
"name": "massive",
"version": "2.11",
"version": "2.12",
"private": true,
"license": "GPL-3.0-only",
"scripts": {
@ -70,4 +70,4 @@
"engines": {
"node": ">=16"
}
}
}