mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 17:16:00 +00:00
* meta: add release automations * Add missing versions * remove old scripts that are no longer useful * add special casing for robodog * skip fetching if HEAD is already available locally * Publish to npm from GitHub actions * fixes * Update afterVersionBump script * Fix getUpToDateRefsFromGitHub script * Make sub-package specific changelogs * fix git and PR opening process in GH Actions * fix Release action * don't fetch GH user names in changelog * add support for commits that touch several packages * add website as a valid commit message prefix * Assign the PR to the releaser and fix other GH related bugs * Remove release branch from CI * Restore git history at the end of local release session * skip CI if assignee has not approved the PR * fix release commit message * beautify commit message * Special case for @uppy/robodog * Failure is not an option * Rename release CI * Always rewind before crashing * Improve logging * fix changelog table * fix linter * Update CONTRIBUTING.md * Remove unused package * Disable Release workflow between two releases * Fix git command and workaround deleted branch
28 lines
1.2 KiB
JavaScript
Executable file
28 lines
1.2 KiB
JavaScript
Executable file
#!/usr/bin/env node
|
|
import process from 'node:process'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import pickSemverness from './choose-semverness.js'
|
|
import commit from './commit-and-open-pr.js'
|
|
import formatChangeLog from './formatChangeLog.js'
|
|
import { validateGitStatus, rewindGitHistory } from './getUpToDateRefsFromGitHub.js'
|
|
|
|
const ROOT = new URL('../../', import.meta.url)
|
|
const spawnOptions = { cwd: fileURLToPath(ROOT) }
|
|
|
|
const deferredReleaseFile = new URL('./.yarn/versions/next.yml', ROOT)
|
|
const temporaryChangeLog = new URL('./CHANGELOG.next.md', ROOT)
|
|
|
|
console.log('Validating local repo status and get previous release info...')
|
|
const [LAST_RELEASE_COMMIT, LOCAL_HEAD] = await validateGitStatus(spawnOptions)
|
|
try {
|
|
console.log('Local git repository is ready, starting release process...')
|
|
await pickSemverness(spawnOptions, LAST_RELEASE_COMMIT, deferredReleaseFile, process.env.PACKAGES.split(' '))
|
|
console.log('Working on the changelog...')
|
|
await formatChangeLog(spawnOptions, LAST_RELEASE_COMMIT, temporaryChangeLog)
|
|
console.log('Final step...')
|
|
await commit(spawnOptions, deferredReleaseFile, temporaryChangeLog)
|
|
} finally {
|
|
console.log('Rewinding git history...')
|
|
await rewindGitHistory(spawnOptions, LOCAL_HEAD)
|
|
}
|