Queer European MD passionate about IT
Browse Source

Bash scripts helping with updates

Davte 5 years ago
parent
commit
166dd0e5cd
2 changed files with 23 additions and 0 deletions
  1. 8 0
      merge_and_push.sh
  2. 15 0
      update_package.sh

+ 8 - 0
merge_and_push.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Merge develop into master and push both branches; checkout to develop at the end.
+
+git checkout master;
+git merge develop;
+git checkout develop;
+git push origin master develop;

+ 15 - 0
update_package.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Python virtual environment directory: packenv variable in my_config.sh
+source my_config.sh;
+# Ensure the success of importing procedure
+if [ -z ${packenv} ];
+then
+  printf "Please set in ""my_config.sh"" the path to bot python virtual environment\n\nExample:\npackenv=""path/to/virtual/env""\n";
+  exit;
+fi
+
+# Merge, push, build and publish package to pypi.org
+bash merge_and_push.sh;
+$packenv/python setup.py sdist bdist_wheel;
+$packenv/twine upload --skip-existing dist/*;