From c8bc01bd6184f1c14c2c08f9c0b7ebd04a3a9c54 Mon Sep 17 00:00:00 2001 From: Ronnie Flathers Date: Fri, 18 Jan 2019 22:49:31 -0600 Subject: [PATCH] build_old_release --- .circleci/config.yml | 99 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..d9ea82de --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,99 @@ +version: 2 +jobs: + build_linux: + docker: + - image: rflathers/centos5_python27 + working_directory: ~/impacket + steps: + - checkout + - run: + name: install impacket + command: | + pip install . + - run: + name: install pyinstaller + command: | + pip install --upgrade pip + pip install --upgrade setuptools + pip install pyinstaller + - run: + name: Create standalone executables + command: | + for i in examples/*.py; do pyinstaller -F $i; done + - run: + name: Rename binaries + command: | + ARCH=$(uname -m) + find dist/ -type f -exec mv {} {}_linux_$ARCH \; + - run: + name: Write version.txt + command: | + awk -F '"' '/version =/{print $2} ' setup.py > ./dist/version.txt + - store_artifacts: + path: ./dist + - persist_to_workspace: + root: dist + paths: + - ./* + build_windows: + docker: + - image: cdrx/pyinstaller-windows:python2 + working_directory: ~/impacket + steps: + - checkout + - run: + name: install impacket + command: | + pip install . + - run: + name: create standalone executables + command: | + for i in examples/*.py; do pyinstaller -F $i; done + - run: + name: rename binaries + command: | + for f in dist/*.exe; do mv "$f" "${f%.*}_windows.${f##*.}"; done + - store_artifacts: + path: ./dist + - persist_to_workspace: + root: dist + paths: + - ./* + github-release: + docker: + - image: cibuilds/github:0.10 + steps: + - attach_workspace: + at: ./artifacts + - run: + name: "Publish Binaries on Github" + command: | + VERSION=$(cat ./artifacts/version.txt) + ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION}-binaries ./artifacts/ + +workflows: + version: 2 + main: + jobs: + - build_linux: + filters: + branches: + only: + - master + - /release-.*/ + - build_windows: + filters: + branches: + only: + - master + - /release-.*/ + - github-release: + filters: + branches: + only: + - master + - /release-.*/ + context: "Github Token" + requires: + - build_linux + - build_windows \ No newline at end of file