Removed old files

This commit is contained in:
Core 2022-08-04 04:50:32 +01:00
parent 1b1d769c21
commit 29f43e4115
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
3 changed files with 0 additions and 109 deletions

View file

@ -1,44 +0,0 @@
if (!process.env['CIRCLECI']) {
console.log(`[CIRCLECI SCRIPT] CircleCI not found... Aborting script`)
return
}
const { readFileSync, writeFile } = require('fs')
const pkg = JSON.parse(readFileSync('package.json').toString());
let channel = process.env['CIRCLE_BRANCH'];
channel = channel.split('/').join('-')
// https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables
const version = pkg.version.split('.');
const patch = version[2].split('-');
if (process.env['CIRCLE_BRANCH'] === 'release') {
pkg.version = `${version[0]}.${version[1]}.${patch[0]}`
} else if (process.env['CIRCLE_BRANCH'] === 'main') {
pkg.version = `${version[0]}.${version[1]}.${patch[0]}.beta.${patch[1]}`
} else {
pkg.version = `${version[0]}.${version[1]}.${patch[0]}-${channel}.${process.env['CIRCLE_BUILD_NUM']}`
}
// package.build.channel = channel
pkg.publish = {
"provider": "github",
"repo": "cider-releases",
"owner": "ciderapp",
"vPrefixedTagName": true,
"tag": `v${pkg.version}`,
"channel": channel,
"releaseType": "release"
}
const { exec } = require('child_process')
exec(`echo $APP_VERSION`, { env: { 'APP_VERSION': pkg.version } }, function (error, stdout, stderr) {
console.log(stdout, stderr, error);
});
writeFile('package.json', JSON.stringify(pkg), err => {
// error checking
if (err) throw err;
console.log(`VERSION CHANGED TO ${pkg.version}`, pkg);
});

View file

@ -1,4 +0,0 @@
{
"key": "f9986d12aab5a0fe66193c559435ede3",
"secret": "acba3c29bd5973efa38cc2f0b63cc625"
}