From 88b41a236609db59d91666ac0c75bd4f874861f1 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 17:48:18 +0300 Subject: [PATCH 01/10] init --- .gitignore | 1 + .../pack-deb-linux-x64.sh | 34 +++++++++++++++++++ .../AngouriMath.Terminal/publish-linux-x64.sh | 6 ++++ 3 files changed, 41 insertions(+) create mode 100755 Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh create mode 100755 Sources/Terminal/AngouriMath.Terminal/publish-linux-x64.sh diff --git a/.gitignore b/.gitignore index eb6ec2ee8..dde550a6e 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ TestResults /Sources/Tests/DotnetBenchmark/Properties/launchSettings.json **/.ionide/** Sources/msbuild.binlog +**/publish-output/** diff --git a/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh b/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh new file mode 100755 index 000000000..bfc996bff --- /dev/null +++ b/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh @@ -0,0 +1,34 @@ +#!/bin/bash +cd publish-output +rm -r angourimath-terminal_1.0_amd64 +mkdir angourimath-terminal_1.0_amd64 +cd angourimath-terminal_1.0_amd64 + +mkdir -p ./usr/local/bin/ +mkdir -p ./usr/share/applications/ +cp -r ../linux-x64 ./usr/local/bin +mv ./usr/local/bin/linux-x64 ./usr/local/bin/angourimath-terminal-data +echo 'cd /usr/local/bin/angourimath-terminal-data && ./AngouriMath.Terminal' > ./usr/local/bin/angourimath-terminal +chmod +x ./usr/local/bin/angourimath-terminal + +mkdir DEBIAN && cd DEBIAN +touch control +printf "Package: angourimath-terminal\n" >> control +printf "Version: 1.0\n" >> control +printf "Architecture: amd64\n" >> control +printf "Maintainer: WhiteBlackGoose \n" >> control +printf "Description: Terminal/CLI in F# for FOSS AngouriMath library\n" >> control + +cd .. +printf "[Desktop Entry]\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Name=AngouriMath Terminal\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "GenericName=Symbolic calculator and computer algebra system\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Comment=Perform symbolic manipulations with expressions using AngouriMath and F#\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Exec=/usr/local/bin/angourimath-terminal\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Icon=/usr/local/bin/angourimath-terminal-data/icon.png\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Type=Application\n" >> ./usr/share/applications/angourimath-terminal.desktop + +cp ../../icon.png ./usr/local/bin/angourimath-terminal-data/ + +cd .. +dpkg-deb --build --root-owner-group angourimath-terminal_1.0_amd64 diff --git a/Sources/Terminal/AngouriMath.Terminal/publish-linux-x64.sh b/Sources/Terminal/AngouriMath.Terminal/publish-linux-x64.sh new file mode 100755 index 000000000..39c6f6632 --- /dev/null +++ b/Sources/Terminal/AngouriMath.Terminal/publish-linux-x64.sh @@ -0,0 +1,6 @@ +#!/bin/bash +dotnet publish \ +-r linux-x64 \ +-c release \ +-o ./publish-output/linux-x64 \ +--self-contained From 26376fa5de07dec837fb382c6885d1d72d8fb812 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 17:51:02 +0300 Subject: [PATCH 02/10] minor --- Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh b/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh index bfc996bff..72ba1c3a1 100755 --- a/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh +++ b/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh @@ -27,6 +27,7 @@ printf "Comment=Perform symbolic manipulations with expressions using AngouriMat printf "Exec=/usr/local/bin/angourimath-terminal\n" >> ./usr/share/applications/angourimath-terminal.desktop printf "Icon=/usr/local/bin/angourimath-terminal-data/icon.png\n" >> ./usr/share/applications/angourimath-terminal.desktop printf "Type=Application\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Terminal=true\n" >> ./usr/share/applications/angourimath-terminal.desktop cp ../../icon.png ./usr/local/bin/angourimath-terminal-data/ From 6daaf0922109f1edda7b8a7a541b9b4051a31b90 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 20:01:48 +0300 Subject: [PATCH 03/10] test commit ... (now it should work?) --- .github/workflows/TerminalNightly.yml | 42 +++++++++---------- .../pack-deb-linux-x64.sh | 19 +++++---- .../AngouriMath.Terminal/publish-osx-x64.sh | 6 +++ .../AngouriMath.Terminal/publish-win-x64.sh | 6 +++ Sources/Terminal/VERSION/VERSION | 1 + 5 files changed, 44 insertions(+), 30 deletions(-) create mode 100755 Sources/Terminal/AngouriMath.Terminal/publish-osx-x64.sh create mode 100755 Sources/Terminal/AngouriMath.Terminal/publish-win-x64.sh create mode 100644 Sources/Terminal/VERSION/VERSION diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index 472230c9c..84fb6b63d 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -3,8 +3,10 @@ name: 'Terminal nightly builds' on: push: branches: - - master - + - * + paths: + - 'VERSION/**' + jobs: TerminalBuild: runs-on: ubuntu-latest @@ -23,32 +25,26 @@ jobs: - name: 'Build terminal for three OS' run: | cd Sources/Terminal/AngouriMath.Terminal - dotnet publish -c Release -r win-x64 -o win-x64-publish - dotnet publish -c Release -r linux-x64 -o linux-x64-publish - dotnet publish -c Release -r osx-x64 -o osx-x64-publish - - - name: 'Create start script' - run: | - echo "dotnet AngouriMath.Terminal.dll" > ./Sources/Terminal/AngouriMath.Terminal/win-x64-publish/start.bat - echo "dotnet AngouriMath.Terminal.dll" > ./Sources/Terminal/AngouriMath.Terminal/linux-x64-publish/start.sh - echo "dotnet AngouriMath.Terminal.dll" > ./Sources/Terminal/AngouriMath.Terminal/osx-x64-publish/start.sh - + ./publish-osx-x64.sh + ./publish-win-x64.sh + ./publish-linux-x64.sh + ./pack-deb-linux-x64.sh + - name: 'Pack' run: | - zip -r terminal-win-x64.zip ./Sources/Terminal/AngouriMath.Terminal/win-x64-publish - zip -r terminal-linux-x64.zip ./Sources/Terminal/AngouriMath.Terminal/linux-x64-publish - zip -r terminal-osx-x64.zip ./Sources/Terminal/AngouriMath.Terminal/osx-x64-publish + zip -r terminal-win-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/win-x64 + zip -r terminal-linux-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/linux-x64 + zip -r terminal-osx-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/osx-64 - name: 'Release' run: | - commithash=$(git rev-parse --short HEAD) - currtime=$(date +%s) - echo "commit hash is $commithash" - echo "time is $currtime" - name=1.0.0-terminal-master-$currtime-$commithash - echo "name is $name" - + name=$(cat ./Sources/Terminal/VERSION/VERSION) + echo "Version: $name" + + cp ./Sources/Terminal/AngouriMath.Terminal/publish-output/angourimath*.deb . + deb=$(ls | grep angourimath*.deb) + echo ${{ secrets.LAB_ACCESS_TOKEN }} > token.txt gh auth login --with-token < token.txt - gh release create v$name 'terminal-win-x64.zip' 'terminal-linux-x64.zip' 'terminal-osx-x64.zip' -p -R asc-community/AngouriMathLab -t 'AngouriMath.Terminal auto-release' + gh release create v$name 'terminal-win-x64.zip' 'terminal-linux-x64.zip' 'terminal-osx-x64.zip' $deb -p -R asc-community/AngouriMathLab -t 'AngouriMath.Terminal auto-release' diff --git a/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh b/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh index 72ba1c3a1..7e8e641a8 100755 --- a/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh +++ b/Sources/Terminal/AngouriMath.Terminal/pack-deb-linux-x64.sh @@ -1,8 +1,12 @@ #!/bin/bash cd publish-output -rm -r angourimath-terminal_1.0_amd64 -mkdir angourimath-terminal_1.0_amd64 -cd angourimath-terminal_1.0_amd64 + +version=$(cat ../../VERSION/VERSION) +filename="angourimath-terminal_${version}_amd64" + +rm -r $filename +mkdir $filename +cd $filename mkdir -p ./usr/local/bin/ mkdir -p ./usr/share/applications/ @@ -14,7 +18,7 @@ chmod +x ./usr/local/bin/angourimath-terminal mkdir DEBIAN && cd DEBIAN touch control printf "Package: angourimath-terminal\n" >> control -printf "Version: 1.0\n" >> control +printf "Version: $version\n" >> control printf "Architecture: amd64\n" >> control printf "Maintainer: WhiteBlackGoose \n" >> control printf "Description: Terminal/CLI in F# for FOSS AngouriMath library\n" >> control @@ -24,12 +28,13 @@ printf "[Desktop Entry]\n" >> ./usr/share/applications/angourimath-terminal.desk printf "Name=AngouriMath Terminal\n" >> ./usr/share/applications/angourimath-terminal.desktop printf "GenericName=Symbolic calculator and computer algebra system\n" >> ./usr/share/applications/angourimath-terminal.desktop printf "Comment=Perform symbolic manipulations with expressions using AngouriMath and F#\n" >> ./usr/share/applications/angourimath-terminal.desktop -printf "Exec=/usr/local/bin/angourimath-terminal\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Exec=x-terminal-emulator -m -e /usr/local/bin/angourimath-terminal-data/AngouriMath.Terminal\n" >> ./usr/share/applications/angourimath-terminal.desktop printf "Icon=/usr/local/bin/angourimath-terminal-data/icon.png\n" >> ./usr/share/applications/angourimath-terminal.desktop printf "Type=Application\n" >> ./usr/share/applications/angourimath-terminal.desktop -printf "Terminal=true\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Terminal=false\n" >> ./usr/share/applications/angourimath-terminal.desktop +printf "Categories=Office;Education;Development;\n" >> ./usr/share/applications/angourimath-terminal.desktop cp ../../icon.png ./usr/local/bin/angourimath-terminal-data/ cd .. -dpkg-deb --build --root-owner-group angourimath-terminal_1.0_amd64 +dpkg-deb --build --root-owner-group $filename diff --git a/Sources/Terminal/AngouriMath.Terminal/publish-osx-x64.sh b/Sources/Terminal/AngouriMath.Terminal/publish-osx-x64.sh new file mode 100755 index 000000000..763bf103f --- /dev/null +++ b/Sources/Terminal/AngouriMath.Terminal/publish-osx-x64.sh @@ -0,0 +1,6 @@ +#!/bin/bash +dotnet publish \ +-r osx-x64 \ +-c release \ +-o ./publish-output/osx-x64 \ +--self-contained diff --git a/Sources/Terminal/AngouriMath.Terminal/publish-win-x64.sh b/Sources/Terminal/AngouriMath.Terminal/publish-win-x64.sh new file mode 100755 index 000000000..1596d0a61 --- /dev/null +++ b/Sources/Terminal/AngouriMath.Terminal/publish-win-x64.sh @@ -0,0 +1,6 @@ +#!/bin/bash +dotnet publish \ +-r win-x64 \ +-c release \ +-o ./publish-output/win-x64 \ +--self-contained diff --git a/Sources/Terminal/VERSION/VERSION b/Sources/Terminal/VERSION/VERSION new file mode 100644 index 000000000..dadcca1e0 --- /dev/null +++ b/Sources/Terminal/VERSION/VERSION @@ -0,0 +1 @@ +1.0.0-alpha From 0e918ea4569c2f34e926dc27965ce70c0e2979f7 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 20:02:29 +0300 Subject: [PATCH 04/10] minor --- .github/workflows/TerminalNightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index 84fb6b63d..c91890a58 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -46,5 +46,5 @@ jobs: echo ${{ secrets.LAB_ACCESS_TOKEN }} > token.txt gh auth login --with-token < token.txt - gh release create v$name 'terminal-win-x64.zip' 'terminal-linux-x64.zip' 'terminal-osx-x64.zip' $deb -p -R asc-community/AngouriMathLab -t 'AngouriMath.Terminal auto-release' + gh release create v$name 'terminal-win-x64.zip' 'terminal-linux-x64.zip' 'terminal-osx-x64.zip' $deb -p -R asc-community/AngouriMathLab -t 'AngouriMath.Terminal' From e4dac8e656179ab8eb08cdfca2dd0a7227d3b1ff Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 20:04:53 +0300 Subject: [PATCH 05/10] syntax error --- .github/workflows/TerminalNightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index c91890a58..d1ab622d2 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -3,7 +3,7 @@ name: 'Terminal nightly builds' on: push: branches: - - * + - '*' paths: - 'VERSION/**' From 8df9a4ff1cd6bff9bf3f2123dea4ff5df17fc1eb Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 20:08:50 +0300 Subject: [PATCH 06/10] path changed --- .github/workflows/TerminalNightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index d1ab622d2..aa109a5d1 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -5,7 +5,7 @@ on: branches: - '*' paths: - - 'VERSION/**' + - './Sources/Terminal/VERSION/**' jobs: TerminalBuild: From 5b443834fa7ebd70ffcb893c876cdc117eb91474 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 21:06:40 +0300 Subject: [PATCH 07/10] minor --- .github/workflows/TerminalNightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index aa109a5d1..3b1095bb2 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -5,7 +5,7 @@ on: branches: - '*' paths: - - './Sources/Terminal/VERSION/**' + - 'Sources/Terminal/VERSION/**' jobs: TerminalBuild: From 917b6fc1c4b3a11b5f5003b5faa6436dc4307c8f Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 21:08:00 +0300 Subject: [PATCH 08/10] change version --- Sources/Terminal/VERSION/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Terminal/VERSION/VERSION b/Sources/Terminal/VERSION/VERSION index dadcca1e0..1a15c9eb1 100644 --- a/Sources/Terminal/VERSION/VERSION +++ b/Sources/Terminal/VERSION/VERSION @@ -1 +1 @@ -1.0.0-alpha +1.0.1-alpha From 82cc2abae5d8abf05bb5177b2cc3cab49e56d1dd Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 21:12:29 +0300 Subject: [PATCH 09/10] minor --- .github/workflows/TerminalNightly.yml | 2 +- Sources/Terminal/VERSION/VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index 3b1095bb2..f8c58bd15 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -34,7 +34,7 @@ jobs: run: | zip -r terminal-win-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/win-x64 zip -r terminal-linux-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/linux-x64 - zip -r terminal-osx-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/osx-64 + zip -r terminal-osx-x64.zip ./Sources/Terminal/AngouriMath.Terminal/publish-output/osx-x64 - name: 'Release' run: | diff --git a/Sources/Terminal/VERSION/VERSION b/Sources/Terminal/VERSION/VERSION index 1a15c9eb1..367dd6246 100644 --- a/Sources/Terminal/VERSION/VERSION +++ b/Sources/Terminal/VERSION/VERSION @@ -1 +1 @@ -1.0.1-alpha +1.0.0.1-alpha From 0a9449dab91a4d085310b9f6919ce62693d40e82 Mon Sep 17 00:00:00 2001 From: WhiteBlackGoose Date: Thu, 15 Sep 2022 21:39:50 +0300 Subject: [PATCH 10/10] polishing --- .github/workflows/TerminalNightly.yml | 4 ++-- README.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/TerminalNightly.yml b/.github/workflows/TerminalNightly.yml index f8c58bd15..c39070b1b 100644 --- a/.github/workflows/TerminalNightly.yml +++ b/.github/workflows/TerminalNightly.yml @@ -3,7 +3,7 @@ name: 'Terminal nightly builds' on: push: branches: - - '*' + - master paths: - 'Sources/Terminal/VERSION/**' @@ -46,5 +46,5 @@ jobs: echo ${{ secrets.LAB_ACCESS_TOKEN }} > token.txt gh auth login --with-token < token.txt - gh release create v$name 'terminal-win-x64.zip' 'terminal-linux-x64.zip' 'terminal-osx-x64.zip' $deb -p -R asc-community/AngouriMathLab -t 'AngouriMath.Terminal' + gh release create v$name 'terminal-win-x64.zip' 'terminal-linux-x64.zip' 'terminal-osx-x64.zip' $deb -p -R asc-community/AngouriMathLab -t 'AngouriMath.Terminal' -n "Expand 'assets' and choose the one for your OS" diff --git a/README.md b/README.md index a5ecf76cb..3a78c6415 100644 --- a/README.md +++ b/README.md @@ -133,9 +133,9 @@ As both a demonstration sample and a convenient tool, this repository includes tool called AngouriMath.Terminal. It is a CLI-based program to interact with AngouriMath (as opposed to API-based interaction, that is, consuming it as a lib). -[**[ Get nightly build ]**](https://github.com/asc-community/AngouriMathLab/releases) - -If you only need this program, here is the instructions how to build and run it: +[**[ Download ]**](https://github.com/asc-community/AngouriMathLab/releases) + +Or build from sources: ``` git clone https://github.com/asc-community/AngouriMath cd AngouriMath/Sources/Terminal/AngouriMath.Terminal