Skip to content

Commit 3f46b8f

Browse files
Deploy using bats
1 parent 8892121 commit 3f46b8f

5 files changed

Lines changed: 22 additions & 6 deletions

File tree

dockers/.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*
2+
!./*
3+
!dist/*
4+
!../dist/

dockers/create-release.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Change directory to the specified directory
44
cd /tmp/dist/kratos-9.3.3/
5+
find . -type f -name "*.unix.bat" -print0 | xargs -0 dos2unix
56

67
# Add execute permission to all .bat files in the directory
78
# chmod 755 *.bat

dockers/linux-releaser.dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
FROM ubuntu
22

3+
RUN apt-get update && \
4+
apt-get install -y dos2unix && \
5+
apt-get clean
6+
37
WORKDIR /tmp
48
COPY create-release.sh create-release.sh
9+
RUN dos2unix create-release.sh
510
RUN chmod 755 /tmp/create-release.sh
611

712
CMD /tmp/create-release.sh
813
# docker build -t linux_releaser -f linux-releaser.dockerfile .
9-
# docker run -v ${PWD}/dist:/tmp/dist linux_releaser
14+
# docker run --rm -v ${PWD}/dist:/tmp/dist linux_releaser

kratos.gid/scripts/Launch.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,17 +289,17 @@ proc Kratos::ExecuteLaunchByMode {launch_mode} {
289289
set docker_image [Kratos::ManagePreferences GetValue docker_image]
290290
set ::env(kratos_docker_image) $docker_image
291291
}
292-
{Launch local compiled version} {
292+
{Your compiled Kratos} {
293293
set python_path [Kratos::ManagePreferences GetValue python_path]
294294
set ::env(python_path) $python_path
295295
set kratos_bin_path [Kratos::ManagePreferences GetValue kratos_bin_path]
296296
set ::env(kratos_bin_path) $kratos_bin_path
297297
}
298-
{Launch via pip} {
298+
{External python} {
299299
set python_path [Kratos::ManagePreferences GetValue python_path]
300300
set ::env(python_path) $python_path
301301
}
302-
{Launch via pip on GiDs python} {
302+
Default {
303303
set python_path [GiD_Python_GetPythonExe]
304304
set ::env(python_path) $python_path
305305
}

tools/create-release.bat

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ copy LICENSE.md %FOLDER%\kratos.gid\LICENSE.md
1414
copy README.md %FOLDER%\kratos.gid\README.md
1515

1616
set RELEASE_FILE=kratos-%VERSION%-win-64.zip
17-
del /f /q %RELEASE_FILE% 2>null
17+
del /f /q %RELEASE_FILE% 2>NUL
1818
powershell.exe -noprofile -command "Compress-Archive -Path '%FOLDER%\*' -DestinationPath %RELEASE_FILE%"
1919
del /f /q .\dist\%RELEASE_FILE% 2>null
2020
move %RELEASE_FILE% .\dist\%RELEASE_FILE%
21-
echo "Version created -> kratos-%VERSION%-win-64"
21+
echo "Windows version created -> kratos-%VERSION%-win-64"
2222

23+
cd ./dockers
24+
docker build -t linux_releaser -f linux-releaser.dockerfile .
25+
set PWD=%cd%
26+
docker run --rm -v "%PWD%\..\dist:/tmp/dist" linux_releaser
27+
28+
echo "Linux version created -> kratos-%VERSION%-linux-64"

0 commit comments

Comments
 (0)