Skip to content

Commit

Permalink
refines the way that git is handled inside the docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-at-decenomy committed May 26, 2024
1 parent 4a56b4b commit 07584c8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions contrib/docker/Dockerfile.dsw-linux-arm64-wallet
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ fi
# Switch to the repository directory
WORKDIR /$TICKER

# Check out a specific version if needed
RUN git stash && \
# Check out the $TARGET
RUN git stash --include-untracked && \
git fetch --all && \
(git checkout $TARGET || (git checkout -B $TARGET && git pull origin $TARGET))
(git checkout $TARGET || git checkout -B $TARGET) && \
(git reset --hard origin/$TARGET || git reset --hard $TARGET)

# Run Git commands to extract the timestamps
RUN git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y-%m-%d %H:%M:%S" > /git_timestamp
Expand Down
7 changes: 4 additions & 3 deletions contrib/docker/Dockerfile.dsw-linux-x64-wallet
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ fi
# Switch to the repository directory
WORKDIR /$TICKER

# Check out a specific version if needed
RUN git stash && \
# Check out the $TARGET
RUN git stash --include-untracked && \
git fetch --all && \
(git checkout $TARGET || (git checkout -B $TARGET && git pull origin $TARGET))
(git checkout $TARGET || git checkout -B $TARGET) && \
(git reset --hard origin/$TARGET || git reset --hard $TARGET)

# Run Git commands to extract the timestamps
RUN git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y-%m-%d %H:%M:%S" > /git_timestamp
Expand Down
7 changes: 4 additions & 3 deletions contrib/docker/Dockerfile.dsw-macos-x64-wallet
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ fi
# Switch to the repository directory
WORKDIR /$TICKER

# Check out a specific version if needed
RUN git stash && \
# Check out the $TARGET
RUN git stash --include-untracked && \
git fetch --all && \
(git checkout $TARGET || (git checkout -B $TARGET && git pull origin $TARGET))
(git checkout $TARGET || git checkout -B $TARGET) && \
(git reset --hard origin/$TARGET || git reset --hard $TARGET)

RUN git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y-%m-%d %H:%M:%S" > /git_timestamp
RUN git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y%m%d%H%M.%S" > /git_timestamp_touch
Expand Down
7 changes: 4 additions & 3 deletions contrib/docker/Dockerfile.dsw-windows-x64-wallet
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ fi
# Switch to the repository directory
WORKDIR /$TICKER

# Check out a specific version if needed
RUN git stash && \
# Check out the $TARGET
RUN git stash --include-untracked && \
git fetch --all && \
(git checkout $TARGET || (git checkout -B $TARGET && git pull origin $TARGET))
(git checkout $TARGET || git checkout -B $TARGET) && \
(git reset --hard origin/$TARGET || git reset --hard $TARGET)

RUN git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y-%m-%d %H:%M:%S" > /git_timestamp
RUN git log -1 --format="%at" | xargs -I{} date -d @{} "+%Y%m%d%H%M.%S" > /git_timestamp_touch
Expand Down

0 comments on commit 07584c8

Please sign in to comment.