Skip to content

Commit dd79e96

Browse files
committed
CI
1 parent 0895ca7 commit dd79e96

19 files changed

+74
-0
lines changed

.github/scripts/vars

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
[ "$(git branch --show-current)" = main ] || SUFFIX="-dev"
6+
cat << EOF > "${GITHUB_OUTPUT}"
7+
image=us-central1-docker.pkg.dev/maestro-org-development/dapp-developer-platform-midl/$(basename "${PWD}")${SUFFIX}
8+
version=$("$(dirname $0)"/version)
9+
EOF

.github/scripts/version

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
TZ=UTC
6+
7+
# Verify clean tree
8+
[ -z "$(git status --porcelain -- ':!root-config')" ]
9+
10+
# Check that we are on main
11+
[ "$(git branch --show-current)" = main ]
12+
13+
# Prints version in the following format: <DAY>.<COMMIT#>_<SHA>
14+
# From docker docs: A tag name may contain lowercase and uppercase characters, digits,
15+
# underscores, periods and dashes. A tag name may not start with a period or a dash
16+
# and may contain a maximum of 128 characters.
17+
git log --pretty="format:%cd %h" --date="format-local:%Y%m%d" | \
18+
awk 'NR==1{d=$1;h=$2}{if(d==$1)c++;else exit}END{print d"."c"_"h}'
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)