Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation instructions and vct file #320

Closed
sjcjoosten opened this issue Oct 29, 2019 · 3 comments
Closed

Installation instructions and vct file #320

sjcjoosten opened this issue Oct 29, 2019 · 3 comments

Comments

@sjcjoosten
Copy link
Contributor

sjcjoosten commented Oct 29, 2019

The releases work great! It would be nice if the releases were to include:

  • a shell file that calls java with the usual parameters
  • a readme file that tells you to use the shell file
  • a version number

It would also be nice if the instructions to use a release were referenced in the installation instructions.

Here's a proposal for a shell file (after the other vct file, also returns 1.1.0 as a version, alternatively we might wish to put the version number in a separate file and just echo that file):

#!/bin/bash

# find out location of binary
DETECT=`dirname "$0"`
# parent is platform directory
DETECT=`dirname "$DETECT"`
# parent is home
export VCT_HOME=`dirname "$DETECT"`

function f() {
  echo $VCT_HOME | sed 's#^/\([a-z]\)\(/\|$\)#\1:\2#' | sed 's|/|\\|g'
}

case `uname -s` in
MINGW*)
SEP=";"
VCT_HOME=`f`
;;
*)
SEP=":"
;;
esac

if [ -d $VCT_HOME/deps/modules ] ; then
  TOOL_HOME=$VCT_HOME/deps
else
  TOOL_HOME=`dirname $VCT_HOME`
  TOOL_HOME=`dirname $TOOL_HOME`
fi
export TOOL_HOME

VCT_PATH=$VCT_HOME/vct-tool.jar

VMARGS="-Xss128M"
i=0
args=()
for arg in "$@" ; do
  case $arg in
    -X*)
      VMARGS="$VMARGS $arg"
    ;;
    --version)
      echo "vct version 1.1.0"
      exit 0
    ;;
    *)
      args[$i]="$arg"
      ((++i))
    ;;
  esac
done

exec java $VMARGS -cp "$VCT_PATH" vct.main.Main $@

Edit: I needed to get an exit-code of 0 instead of 1.

@pieter-bos
Copy link
Member

Perhaps you missed it, but with #311 this has been partially solved. We now use sbt-native-packager, which amongst other things generates releases with run scripts for us. Currently we just map the main README.md to the release, but that might indeed not be very applicable to how you run vercors in the release. Re: version numbers, indeed we should have a way to output them. I would however like to find a way to only have the version number in one place, preferrably build.sbt.

@sjcjoosten
Copy link
Contributor Author

Sorry for inflating so many issues in one place. Here's what's left:

  • version numbers
  • get instructions on how to use the release inside the release itself
  • instructions on how to download and use the release on the VerCors-related websites.

Feel free to make this issue only about version numbers (by changing the title) and ask me to make separate issues for the documentation-side of things. (I agree that ideally everything is only written and maintained in one place, so I'm hesitant to split up the documentation-bits further.)

@pieter-bos
Copy link
Member

  • There are now instructions inside releases
  • The website has a separate issue (and incidentally the website has moved to a different repository, so let's place issues for the website there)
  • Since the above commit vercors can output its version number

The reason you wanted version numbers was for cache invalidation in SplitVerify, yes? Currently we just keep the version number last released on the dev branch, until the next release happen (so any development build would currently just output "Vercors 1.2.0"), is that the desired behaviour? Just for reference, this is now what the version output looks like:

Vercors 1.2.0
Built by sbt 1.3.0, scala 2.12.7 at 2019-12-03T13:48:16.850Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants