Skip to content

Instantly share code, notes, and snippets.

@fishyer
Created November 14, 2024 09:21
Show Gist options
  • Save fishyer/906fdfc55cd2fb0ab9ce27f100ba4aaa to your computer and use it in GitHub Desktop.
Save fishyer/906fdfc55cd2fb0ab9ce27f100ba4aaa 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