chore: update all references to main in docs, examples, and templates
This commit is contained in:
@@ -2,20 +2,6 @@
|
||||
|
||||
# List all published packages
|
||||
|
||||
# parse params: tag=beta or blank string ''
|
||||
tag=${1:-}
|
||||
|
||||
echo
|
||||
|
||||
if [ -n "$tag" ]; then
|
||||
echo "Listing packages with tag: $tag"
|
||||
tag="@$tag"
|
||||
else
|
||||
echo "Listing latest packages"
|
||||
tag=""
|
||||
fi
|
||||
echo
|
||||
|
||||
packages=$(find packages -name package.json -type f -exec grep -L '"private": true' {} \; | xargs jq -r '.name')
|
||||
|
||||
# sort alphabetically
|
||||
@@ -23,7 +9,11 @@ packages=$(echo "$packages" | tr ' ' '\n' | sort -u | tr '\n' ' ')
|
||||
|
||||
# Loop through each package and print the name and version. Print as table
|
||||
|
||||
printf "%-30s %-20s %-20s\n" "package" "latest" "beta"
|
||||
|
||||
for package in $packages; do
|
||||
version=$(npm view "$package""$tag" version 2> /dev/null || echo "N/A")
|
||||
printf "%-30s %s\n" "$package" "$version"
|
||||
info=$(npm view "$package" dist-tags --json)
|
||||
latest=$(echo "$info" | jq -r '.latest')
|
||||
beta=$(echo "$info" | jq -r '.beta')
|
||||
printf "%-30s %-20s %-20s\n" "$package" "$latest" "$beta"
|
||||
done
|
||||
|
||||
@@ -22,6 +22,11 @@ async function main() {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (packageNames.length > 1 && packageNames.find((p) => p === 'payload')) {
|
||||
console.error(chalk.bold.red('Cannot publish payload with other packages'))
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
console.log(`\n${chalk.bold.green('Publishing packages:')}\n`)
|
||||
console.log(`${packageNames.map((p) => ` ${p}`).join('\n')}`)
|
||||
console.log('\n')
|
||||
@@ -59,7 +64,7 @@ async function main() {
|
||||
const newVersion = packageObj.version
|
||||
|
||||
execSync(`git commit -m "chore(release): ${packageName}@${newVersion}"`, execOpts)
|
||||
execSync(`pnpm publish -C ${packageDir} --tag beta --no-git-checks`, execOpts)
|
||||
execSync(`pnpm publish -C ${packageDir} --tag latest --no-git-checks`, execOpts)
|
||||
results.push({ name: packageName, success: true })
|
||||
} catch (error) {
|
||||
console.error(`ERROR: ${error.message}`)
|
||||
|
||||
Reference in New Issue
Block a user