We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e4e807 commit 69ba0c0Copy full SHA for 69ba0c0
Earthfile
@@ -21,7 +21,12 @@ build-and-release-on-github:
21
RUN apt-get update >/dev/null 2>&1 && apt-get -y install gh >/dev/null 2>&1
22
COPY .git .git
23
COPY +build/target target
24
- RUN --push export release_timestamp=$(date '+%Y-%m-%d @ %H:%M'); \
+ RUN --push export BRANCH=$(git rev-parse --abbrev-ref HEAD); \
25
+ if [ "$BRANCH" != "main" -a "$BRANCH" != "master" ]; then \
26
+ echo "not releasing, we're on branch $BRANCH"; \
27
+ exit 0; \
28
+ fi; \
29
+ export release_timestamp=$(date '+%Y-%m-%d @ %H:%M'); \
30
export release_timestamp_terse=$(date '+%Y-%m-%d-%H-%M'); \
31
export release_hash_short=$(git rev-parse --short HEAD); \
32
export release_hash=$(git rev-parse HEAD); \
0 commit comments