Push to play store last in deploy.mjs
If the play store is acting up then it should still at least push the tags so f-droid can update.
This commit is contained in:
parent
07c704841d
commit
5991a6de39
23
deploy.mjs
23
deploy.mjs
|
@ -29,16 +29,21 @@ let packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
||||||
packageJson.version = versionName;
|
packageJson.version = versionName;
|
||||||
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
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';
|
const isWindows = os.platform() === 'win32';
|
||||||
execSync(isWindows ? '.\\gradlew.bat bundleRelease' : './gradlew bundleRelease', { stdio: 'inherit' });
|
execSync(isWindows ? '.\\gradlew.bat bundleRelease' : './gradlew bundleRelease', { stdio: 'inherit' });
|
||||||
execSync('bundle install', { stdio: 'inherit' });
|
execSync('bundle install', { stdio: 'inherit' });
|
||||||
execSync('bundle exec fastlane supply --aab app/build/outputs/bundle/release/app-release.aab', { 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'));
|
|
Loading…
Reference in New Issue
Block a user