mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: determine electron version from tags not files (#36134)
* build: determine electron version from tags not files (#36106) * build: determine electron version from tags not files * build: make electron_version dependent on packed-refs and git HEAD * build: do not delete electron/.git * build: do not revert a commit we didn't make * build: gen version file instead of just writing it * build: update cache and ninja targets * build: copy resource.h to generated electron.rc * build: electron_win32_resources should be public deps * build: also copy the icon Co-authored-by: MarshallOfSound <marshallofsound@electronjs.org> * build: ensure get-version runs in the electron git checkout (#36128) * build: strip v in the getElectronVersion helper Co-authored-by: MarshallOfSound <marshallofsound@electronjs.org> Co-authored-by: Samuel Attard <sam@electronjs.org> Co-authored-by: Samuel Attard <sattard@salesforce.com>
This commit is contained in:
@@ -68,12 +68,6 @@ async function nextBeta (v) {
|
||||
return tags.length === 0 ? `${next}-beta.1` : semver.inc(tags.pop(), 'prerelease');
|
||||
}
|
||||
|
||||
async function getElectronVersion () {
|
||||
const versionPath = path.resolve(ELECTRON_DIR, 'ELECTRON_VERSION');
|
||||
const version = await readFile(versionPath, 'utf8');
|
||||
return version.trim();
|
||||
}
|
||||
|
||||
async function nextNightly (v) {
|
||||
let next = semver.valid(semver.coerce(v));
|
||||
const pre = `nightly.${getCurrentDate()}`;
|
||||
@@ -114,7 +108,6 @@ module.exports = {
|
||||
nextAlpha,
|
||||
nextBeta,
|
||||
makeVersion,
|
||||
getElectronVersion,
|
||||
nextNightly,
|
||||
preType
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user