Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs/kubo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3101df56fa5f^
Choose a base ref
...
head repository: ipfs/kubo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0befe2bf883a
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 13, 2015

  1. install-sharness.sh: implement updates

    We want to be able to update Sharness to benefit from
    new features.
    
    License: MIT
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    chriscool committed Jun 13, 2015
    Copy the full SHA
    3101df5 View commit details
  2. sharness/Makefile: force sharness version check

    License: MIT
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    chriscool committed Jun 13, 2015
    Copy the full SHA
    ac9f441 View commit details
  3. install-sharness.sh: update sharness

    License: MIT
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    chriscool committed Jun 13, 2015
    Copy the full SHA
    0befe2b View commit details
Showing with 31 additions and 10 deletions.
  1. +2 −2 test/sharness/Makefile
  2. +29 −8 test/sharness/lib/install-sharness.sh
4 changes: 2 additions & 2 deletions test/sharness/Makefile
Original file line number Diff line number Diff line change
@@ -35,8 +35,8 @@ aggregate: clean-test-results $(T)

deps: $(SHARNESS) $(BINS) curl

$(SHARNESS):
@echo "*** installing $@ ***"
$(SHARNESS): FORCE
@echo "*** checking $@ ***"
lib/install-sharness.sh

bin/%: FORCE
37 changes: 29 additions & 8 deletions test/sharness/lib/install-sharness.sh
Original file line number Diff line number Diff line change
@@ -6,21 +6,42 @@
#

# settings
version=50229a79ba22b2f13ccd82451d86570fecbd194c
version=5eee9b51b5621cec95a64018f0cc779963b230d2
urlprefix=https://github.com/mlafeldt/sharness.git
clonedir=lib
sharnessdir=sharness

if test -f "$clonedir/$sharnessdir/SHARNESS_VERSION_$version"
then
# There is the right version file. Great, we are done!
exit 0
fi

die() {
echo >&2 "$@"
exit 1
echo >&2 "$@"
exit 1
}

mkdir -p "$clonedir" || die "Could not create '$clonedir' directory"
cd "$clonedir" || die "Could not cd into '$clonedir' directory"
checkout_version() {
git checkout "$version" || die "Could not checkout '$version'"
rm -f SHARNESS_VERSION_* || die "Could not remove 'SHARNESS_VERSION_*'"
touch "SHARNESS_VERSION_$version" || die "Could not create 'SHARNESS_VERSION_$version'"
echo "Sharness version $version is checked out!"
}

git clone "$urlprefix" || die "Could not clone '$urlprefix'"
cd "$sharnessdir" || die "Could not cd into '$sharnessdir' directory"
git checkout "$version" || die "Could not checkout '$version'"
if test -d "$clonedir/$sharnessdir/.git"
then
# We need to update sharness!
cd "$clonedir/$sharnessdir" || die "Could not cd into '$clonedir/$sharnessdir' directory"
git fetch || die "Could not fetch to update sharness"
checkout_version
else
# We need to clone sharness!
mkdir -p "$clonedir" || die "Could not create '$clonedir' directory"
cd "$clonedir" || die "Could not cd into '$clonedir' directory"

git clone "$urlprefix" || die "Could not clone '$urlprefix'"
cd "$sharnessdir" || die "Could not cd into '$sharnessdir' directory"
checkout_version
fi
exit 0