Skip to content

Commit 55458d2

Browse files
committedJul 22, 2017
travis: More refactoring.
- Remove old broken symlink code. - Actually commit the symlink.
1 parent e362df9 commit 55458d2

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed
 

‎.travis/build.sh

+15-18
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,6 @@ function build() {
196196
cp $TARGET_BUILD_DIR/software/firmware/version_data.c $COPY_DEST/logs/version_data.c
197197
cp $TARGET_BUILD_DIR/output.*.log $COPY_DEST/logs/
198198

199-
# Only hdmi2usb + lm32 is considered usable at the moment
200-
UNSTABLE_LINK="$PLATFORM/firmware/unstable"
201-
if [ "$TARGET" = "hdmi2usb" -a "$CPU" = "lm32" ]; then
202-
# Create link to latest unstable build
203-
rm $UNSTABLE_LINK
204-
ln -s ../../$COPY_DEST $UNSTABLE_LINK
205-
echo ""
206-
echo "- Added symlink of $UNSTABLE_LINK -> $COPY_DEST"
207-
fi
208199
(
209200
cd $COPY_DEST
210201
sha256sum $(find -type f) > sha256sum.txt
@@ -341,7 +332,7 @@ if [ ! -z "$PREBUILT_DIR" ]; then
341332
for i in 1 2 3 4 5 6 7 8 9 10; do # Try 10 times.
342333
if [ "$TRAVIS_BRANCH" = "master" ]; then
343334
echo
344-
echo "Updating unstable link"
335+
echo "Updating unstable link (Try $i)"
345336
echo "---------------------------------------------"
346337
for PLATFORM in $PLATFORMS; do
347338
(
@@ -351,30 +342,36 @@ if [ ! -z "$PREBUILT_DIR" ]; then
351342
cd $PLATFORM/firmware
352343
LATEST="$(ls ../../archive/master/ | tail -n 1)"
353344
HDMI2USB_FIRMWARE="$LATEST/$PLATFORM/hdmi2usb/lm32"
345+
echo "Checking for '$HDMI2USB_FIRMWARE'"
354346
if [ -d "$HDMI2USB_FIRMWARE" ]; then
355347
echo "Changing $PLATFORM from '$(readlink unstable)' to '$HDMI2USB_FIRMWARE'"
356348
ln -sf unstable "$HDMI2USB_FIRMWARE"
357349
git add unstable
350+
git commit -a \
351+
-m "Updating unstable link (Travis build #$TRAVIS_BUILD_NUMBER of $GIT_REVISION for PLATFORM=$PLATFORM TARGET=$TARGET CPU=$CPU)" \
352+
-m "" \
353+
-m "From https://github.com/$TRAVIS_REPO_SLUG/tree/$TRAVIS_COMMIT" \
354+
-m "$TRAVIS_COMIT_MESSAGE"
358355
else
359356
echo "Not updating $PLATFORM"
360357
fi
361358
)
362359
done
363360
fi
364361
echo
365-
echo "Changes to be pushed"
362+
echo "Merging (Try $i)"
366363
echo "---------------------------------------------"
367-
git diff origin/master --stat=1000,1000
364+
git diff --stat origin/master && break
365+
git fetch
366+
git merge origin/master -m "Merging #$TRAVIS_JOB_NUMBER of $GIT_REVISION"
368367
echo
369-
echo "Pushing"
368+
echo "Changes to be pushed (Try $i)"
370369
echo "---------------------------------------------"
371-
git push --quiet origin master > /dev/null 2>&1 && break
370+
git diff origin/master --stat=1000,1000
372371
echo
373-
echo "Merging"
372+
echo "Pushing (Try $i)"
374373
echo "---------------------------------------------"
375-
git diff --stat origin/master && break
376-
git fetch
377-
git merge origin/master -m "Merging #$TRAVIS_JOB_NUMBER of $GIT_REVISION"
374+
git push --quiet origin master > /dev/null 2>&1 && break
378375
done
379376
echo
380377
echo "Push finished!"

0 commit comments

Comments
 (0)
Please sign in to comment.