mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-28 17:01:02 +00:00
major: initial release
* initial development * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * pipeline * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * ci/cd * pokemon * pokemon * pokemon * pokemon * pokemon * pokemon * improvements * improvements * ci/cd * ci/cd * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements * improvements --------- Co-authored-by: sdine <sdine@sdine.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Usage: $0 <branch-name> <commit-sha>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
branch_name="$1"
|
||||
commit_sha="$2"
|
||||
|
||||
branch_safe="$(echo "${branch_name}" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9._-]+/-/g; s/^-+|-+$//g')"
|
||||
short_sha="$(echo "${commit_sha}" | cut -c1-7)"
|
||||
|
||||
if [[ -z "${branch_safe}" ]]; then
|
||||
branch_safe="branch"
|
||||
fi
|
||||
|
||||
echo "${branch_safe}-${short_sha}"
|
||||
Reference in New Issue
Block a user