mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-29 08:07:48 +09:00
Closes https://github.com/webstudio-is/webstudio/issues/5877 Closes https://github.com/webstudio-is/webstudio/issues/4775 - Organize assets into nested folders. - Navigate folders with breadcrumbs and Back controls. - Select and manage multiple assets and folders at once. - Drag, copy, cut, paste, duplicate, move, and delete items. - Use context menus and familiar keyboard shortcuts for common actions. - Search and sort assets and folders, with folders grouped first. - Upload files directly into the active folder. - Manage folder placement from asset and folder settings. - Automate asset and folder management through MCP.
16 lines
467 B
Bash
Executable File
16 lines
467 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
ref_name="${1:?A git ref name is required}"
|
|
alias="${ref_name/.staging/}"
|
|
alias=$(echo "${alias}" | sed 's/[^a-zA-Z0-9_-]//g' | tr '[:upper:]_' '[:lower:]-' | sed 's/-\{2,\}/-/g')
|
|
|
|
# Project requests use p-<uuid>-dot-<alias>, which must fit in a 63-byte DNS label.
|
|
if (( ${#alias} > 20 )); then
|
|
hash=$(printf '%s' "${alias}" | git hash-object --stdin | cut -c1-7)
|
|
alias="${alias:0:12}-${hash}"
|
|
fi
|
|
|
|
printf '%s\n' "${alias}"
|