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.

45 lines
1.0 KiB

  1. #!/bin/bash
  2. #Move out of the build folder
  3. cd ../..
  4. packageProject ()
  5. {
  6. local LOCAL_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-$LOCAL_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. VERSIONSTRING=$(head -1 ./version.info)
  30. RELEASE="$PWD/target"
  31. #make sure release exists and is empty
  32. if [ -d $RELEASE ]; then
  33. rm -R $RELEASE
  34. fi
  35. mkdir $RELEASE
  36. packageProject $VERSIONSTRING "./cli" $RELEASE
  37. packageProject $VERSIONSTRING "./gui" $RELEASE
  38. #packageProject $VERSIONSTRING "./daemon" $RELEASE