You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1001 B

  1. #!/bin/bash
  2. #Move out of the build folder
  3. cd ../..
  4. packageProject ()
  5. {
  6. VERSION=$1
  7. RELEASE=$3
  8. ROOT=$PWD
  9. cd $2
  10. #Getting variables that are produced by the script
  11. NAME=$(head -1 ./name.info)
  12. PACKAGENAME=$NAME-$VERSION
  13. PACKAGETAR=$PACKAGENAME.tar.gz
  14. PACKAGEZIP=$PACKAGENAME.zip
  15. TARGET=$PWD/target
  16. #Packaging Jar Distributable
  17. cd target/release/
  18. echo "creating $PACKAGETAR in $TARGET"
  19. tar -zcvf $RELEASE/$PACKAGETAR .
  20. echo "creating $PACKAGEZIP in $TARGET"
  21. zip -r $RELEASE/$PACKAGEZIP ./*
  22. #Removing prebuilt jar in target
  23. rm $TARGET/*.jar
  24. #Copying Jar to target for archiving
  25. cp ./*.jar $TARGET
  26. cd $ROOT
  27. }
  28. #Getting variables that are produced by the script
  29. VERSION=$(head -1 ./version.info)
  30. RELEASE="$PWD/target"
  31. #make sure release exists
  32. if [ ! -d $RELEASE ]; then
  33. mkdir $RELEASE
  34. fi
  35. packageProject $VERSION "./cli" $RELEASE
  36. packageProject $VERSION "./gui" $RELEASE
  37. #packageProject $VERSION "./daemon" $RELEASE