Skip to content

Instantly share code, notes, and snippets.

@fishyer
Created November 14, 2024 09:18
Show Gist options
  • Save fishyer/d7f48e05ece1d33d03eacb6c1470199a to your computer and use it in GitHub Desktop.
Save fishyer/d7f48e05ece1d33d03eacb6c1470199a to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "✅post-commit hook start at $(date)"
start_time=$(date +%s)
# 查看环境变量
source .env
echo "👁️build_version: $build_version"
echo "👁️build_time: $build_time"
# 添加git tag
git tag -a $build_version -m "build_version: $build_version build_time: $build_time"
echo "🎉post-commit hook end at $(date) elapsed $(($(date +%s) - $start_time)) seconds"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment