Skip to content

Instantly share code, notes, and snippets.

View olekhy's full-sized avatar
🤓
happy developer

Alexander Hutorezki olekhy

🤓
happy developer
View GitHub Profile
@olekhy
olekhy / ci.md
Created January 26, 2024 12:35
example

stages:

  • deploy

variables: AWS_DEFAULT_REGION: "your-aws-region" ECS_CLUSTER: "your-ecs-cluster" ECS_SERVICE_NAME: "your-ecs-service-name" ECS_TASK_DEFINITION: "your-ecs-task-definition" IMAGE_TAG: "latest"

Notes

inode_number=$(stat -c '%i' "$1")
#unique_id=$(echo "$inode_number" | sha1sum | awk '{print substr($1, 1, 4)}')
#unique_id=$((0x$(echo -n "$inode_number" | sha1sum | awk '{print $1}') % 4294967296))
unique_id=$((0x$(echo -n "$inode_number" | sha1sum | cut -c 1-8) % 10000))
echo $unique_id