Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Jan 16, 2024
1 parent 3c631b3 commit 2107202
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 43 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/windows.yml

This file was deleted.

26 changes: 26 additions & 0 deletions docker-build.sh
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion src/main/java/org/y4sec/encryptor/core/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 2107202

Please sign in to comment.