diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index d6f2bdb..0000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: windows action - -on: - workflow_dispatch: - -jobs: - - build: - runs-on: windows-2019 - steps: - - name: checkout the source - uses: actions/checkout@v4 - - - name: set up python - uses: actions/setup-python@v5 - with: - python-version: '3.8' - - - name: install cmake - run: | - curl -L https://cmake.org/files/v3.28/cmake-3.28.0-rc4-windows-x86_64.zip -o cmake.zip - Expand-Archive -LiteralPath cmake.zip -DestinationPath . -Force - - - name: install ninja - run: | - curl -L https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip -o ninja.zip - Expand-Archive -LiteralPath ninja.zip -DestinationPath . -Force - - - name: build - run: | - cd native - ..\cmake-3.28.0-rc4-windows-x86_64\bin\cmake.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=..\ninja.exe -G Ninja -S . -B build-release - ..\cmake-3.28.0-rc4-windows-x86_64\bin\cmake.exe --build build-release --target all - python main.py - Compress-Archive -Path target\* -DestinationPath build-windows.zip - - - name: upload artifact - uses: actions/upload-artifact@v4 - with: - name: build-artifact - path: | - native/build-windows.zip \ No newline at end of file diff --git a/docker-build.sh b/docker-build.sh new file mode 100644 index 0000000..e63da2f --- /dev/null +++ b/docker-build.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +IMAGE_NAME="code-encryptor" +CONTAINER_NAME="code-encryptor-builder" +Y4_VERSION="0.4" + +EXISTING_IMAGE=$(docker images -q $IMAGE_NAME:$Y4_VERSION) +if [ ! -z "$EXISTING_IMAGE" ]; then + echo "image $IMAGE_NAME:$Y4_VERSION already exists. deleting..." + docker rmi $EXISTING_IMAGE +fi + +docker build -t $IMAGE_NAME:$Y4_VERSION . +CONTAINER_ID=$(docker run -d --name $CONTAINER_NAME $IMAGE_NAME:$Y4_VERSION) +echo "container is running with ID: $CONTAINER_ID" + +echo "waiting for container to complete the task" +docker wait $CONTAINER_ID + +docker cp $CONTAINER_ID:/app/build.zip . +echo "file copied to build.zip" + +docker stop $CONTAINER_ID +docker rm $CONTAINER_ID + +echo "container stopped and removed" diff --git a/src/main/java/org/y4sec/encryptor/core/Constants.java b/src/main/java/org/y4sec/encryptor/core/Constants.java index 87edd06..a6186f8 100644 --- a/src/main/java/org/y4sec/encryptor/core/Constants.java +++ b/src/main/java/org/y4sec/encryptor/core/Constants.java @@ -4,7 +4,7 @@ * Constants */ public interface Constants { - String Version = "0.3"; + String Version = "0.4"; String DecrypterDLL = "libdecrypter.dll"; String DecrypterSo = "libdecrypter.so"; String EncryptorDLL = "libencryptor.dll";