Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
2a2bf11
Cleanup of env variables
aartiPl May 17, 2022
9418ecb
Fixed indentation and generation of Gradle files for IntelliJ
aartiPl May 17, 2022
7efa6a2
Improved test function - it is possible to skip some tests e.g. assem…
aartiPl May 17, 2022
e634ba2
* Renamed test_suite.sh to linux_suite.sh (for later multi OS tests)
aartiPl May 17, 2022
69e2a14
Improved runConfiguration
aartiPl May 17, 2022
e039e18
Support for idea project creation: correct handling for duplicated fi…
aartiPl May 17, 2022
53ace15
IntelliJ support fixed
aartiPl May 18, 2022
2c43daa
IntelliJ support fixed II
aartiPl May 18, 2022
70e869c
Make script executable
aartiPl May 18, 2022
45306ec
Formatting of wrapper for scripts.
aartiPl May 19, 2022
7ef8a77
Expose OSTYPE through env variable.
aartiPl May 20, 2022
b5eb9d3
Fix for OsType comparison logic (#357)
justixLoL May 20, 2022
fd211ec
Added comment.
aartiPl May 20, 2022
180bf09
Merge branch 'master' into kscript_4.1
aartiPl May 21, 2022
97b090c
build: installation tester
aartiPl May 24, 2022
d53a0d3
Merge branch 'master' into kscript_4.1
aartiPl May 24, 2022
b6466c9
build: fixed name
aartiPl May 24, 2022
eb76d94
Update installer.yml
aartiPl May 24, 2022
5b6f962
build: fixed action
aartiPl May 24, 2022
95ee2e1
build: fixed action
aartiPl May 24, 2022
e9420f1
build: fixed action
aartiPl May 24, 2022
1af84c2
build: fixed action
aartiPl May 24, 2022
1311316
build: better tests + fix
aartiPl May 24, 2022
b1d56f1
build: better tests + fix
aartiPl May 24, 2022
d424b2a
build: better tests + fix
aartiPl May 24, 2022
639d5ae
build: better tests + fix
aartiPl May 24, 2022
c648657
Small fixes.
aartiPl May 25, 2022
4e07de4
Added ability to start build manually.
aartiPl May 25, 2022
579f2b2
Updated version
aartiPl May 25, 2022
a275fcc
Merge branch 'master' into kscript_4.1
aartiPl May 26, 2022
f801673
Fix for build action.
aartiPl May 26, 2022
b16772d
refactor: fewer dependencies for CommandResolver
aartiPl May 26, 2022
2c8e57a
bugfix: fix for OSTYPE linux-musl which is reported on Alpine Linux.
aartiPl Jun 7, 2022
62195c3
Temporary commit.
aartiPl Jun 9, 2022
c762b49
Fixes.
aartiPl Jun 9, 2022
081991b
Fixes continuation
aartiPl Jun 9, 2022
4019085
Applied OsPath
aartiPl Jun 10, 2022
f830710
KOTLIN_HOME is required.
aartiPl Jun 10, 2022
e84154b
Improved OsPath.
aartiPl Jun 10, 2022
71f077b
* feature: implemented OSPath and moving app to it (for easier unit t…
aartiPl Jun 10, 2022
715e1a5
* feature: relaxed validation constraints on OsPath, to make it frien…
aartiPl Jun 11, 2022
ee0aa4b
Cleanups and improvements
aartiPl Jun 12, 2022
02bba53
Cleanups and improvements
aartiPl Jun 12, 2022
8119227
Migrated kscript to os independent paths (OsPath)
aartiPl Jun 13, 2022
fec7bfd
Small fixes and improvements
aartiPl Jun 14, 2022
c2d13eb
Small fixes and improvements
aartiPl Jun 15, 2022
88c31d6
Batch is horrible :-(
aartiPl Jun 15, 2022
a09c957
fixes
aartiPl Jun 15, 2022
8596c8b
feature: KScript seems to work on plain Windows console.
aartiPl Jun 22, 2022
d77cd45
Partial commit with some fixes.
aartiPl Jun 24, 2022
715bc75
Fix #335: Get --package working with Gradle 7 by replacing the capsul…
vsajip Jul 1, 2022
a4b5573
* Renamed test directory with suites
aartiPl Jul 3, 2022
8fa9854
* Added Kotlin integration tests for packaging and simple tests
aartiPl Jul 5, 2022
15eea6a
Removed comment
aartiPl Jul 5, 2022
d250e11
Integration tests as JUnit - continuation
aartiPl Jul 7, 2022
bb27a5b
Fix for test
aartiPl Jul 7, 2022
9403d60
Fix for test
aartiPl Jul 7, 2022
484f2e0
Fix for test
aartiPl Jul 7, 2022
49ac816
Fix for tests
aartiPl Jul 7, 2022
7d58546
Fixes for tests
aartiPl Jul 7, 2022
53fc20c
Fixes for msys
aartiPl Jul 9, 2022
6322024
Fixes for msys
aartiPl Jul 9, 2022
a1ad357
Fixes for action
aartiPl Jul 9, 2022
2a52fbd
Fixes for MSYS.
aartiPl Jul 11, 2022
4b8ac1b
Fixes for MSYS.
aartiPl Jul 11, 2022
afeead9
* Fixes for MSYS and Cygwin
aartiPl Jul 11, 2022
59eea1e
* Renamed MAC to MACOS constant.
aartiPl Jul 12, 2022
1af136c
* Renamed MAC to MACOS constant
aartiPl Jul 13, 2022
4aece83
* Renamed MAC to MACOS constant
aartiPl Jul 14, 2022
a1cb161
Cleanup of tests.
aartiPl Jul 31, 2022
de9677c
Cleanup of tests + reliability fixes
aartiPl Aug 1, 2022
99196d4
Increased timeouts.
aartiPl Aug 1, 2022
5d2a6a0
Test fixes.
aartiPl Aug 1, 2022
256f3dc
Test fixes.
aartiPl Aug 2, 2022
397863e
Cleanup, bugfixes and small improvements.
aartiPl Aug 2, 2022
cfe07de
Now tags are indeed working.
aartiPl Aug 5, 2022
a1a9737
Fixes.
aartiPl Aug 5, 2022
e61da2d
Fixes.
aartiPl Aug 5, 2022
0ea066d
Fixes.
aartiPl Aug 5, 2022
58b5eab
Fixes.
aartiPl Aug 5, 2022
1b4ac2a
Renamed tool directory.
aartiPl Aug 5, 2022
91f1b14
Fixes and removed some bash tests.
aartiPl Aug 5, 2022
e4a9728
* Converted BootstrapHeaderTest to JUnit
aartiPl Aug 6, 2022
56b1287
Fixed permissions for test file.
aartiPl Aug 6, 2022
74cb2b6
github actions for cygwin and cmd
aartiPl Aug 6, 2022
73ecb7c
github actions for cygwin and cmd
aartiPl Aug 6, 2022
5c6e37a
github actions for cygwin and cmd
aartiPl Aug 6, 2022
2241c66
github actions for cygwin and cmd
aartiPl Aug 6, 2022
ed2f376
github actions for cygwin and cmd
aartiPl Aug 6, 2022
e36d5c0
github actions for cygwin and cmd
aartiPl Aug 6, 2022
d601601
fixes for windows build
aartiPl Aug 6, 2022
bd6196b
fixes for windows build
aartiPl Aug 6, 2022
b9cf92e
fixes
aartiPl Aug 6, 2022
91b2bdd
fix for Cygwin
aartiPl Aug 8, 2022
eaaf07d
fix for Cygwin
aartiPl Aug 8, 2022
7986af2
fix for Cygwin
aartiPl Aug 8, 2022
77de9b0
More debugging information.
aartiPl Aug 10, 2022
7711c87
Fixes for finding KOTLIN_HOME.
aartiPl Aug 10, 2022
7523333
Fixes for finding KOTLIN_HOME.
aartiPl Aug 10, 2022
db24dac
Fixes for finding KOTLIN_HOME.
aartiPl Aug 10, 2022
477fe6b
Test fix.
aartiPl Aug 10, 2022
ef4a417
Fixes for OSes
aartiPl Aug 11, 2022
b78b019
Tests fixes.
aartiPl Aug 12, 2022
eb6dcec
Tests fixes.
aartiPl Aug 12, 2022
9de7a5e
Tests fixes.
aartiPl Aug 12, 2022
a8d7261
Tests fixes.
aartiPl Aug 12, 2022
25bd479
Tests fixes.
aartiPl Aug 12, 2022
7e6967d
Replace .kscript dir with OS specific dirs (#323) (#374)
meztihn Aug 13, 2022
d48733b
Test fixe.
aartiPl Aug 13, 2022
e366420
Test fix.
aartiPl Aug 13, 2022
2e6ee19
Fix paths.
aartiPl Aug 13, 2022
1a1e34d
Updated docs
aartiPl Aug 13, 2022
1881f7c
Changes is project structure
aartiPl Aug 13, 2022
dc31c94
Fixes afer refactoring.
aartiPl Aug 13, 2022
5f93027
Refactoring to allow deprecation.
aartiPl Aug 13, 2022
f8ebc1e
* Deprecation of old features (annotations based on comments)
aartiPl Aug 16, 2022
5051cf4
Merge branch 'master' into kscript_4.1
aartiPl Aug 16, 2022
c02ae92
Updated tests.
aartiPl Aug 17, 2022
37239c9
Updated docs and versions.
aartiPl Aug 18, 2022
0b6df62
Doc fix.
aartiPl Aug 18, 2022
de83533
Doc fix.
aartiPl Aug 18, 2022
90caecb
Doc fix.
aartiPl Aug 18, 2022
ce56bca
KotlinOpts -> KotlinOptions
aartiPl Aug 18, 2022
f2af92b
KotlinOpts -> KotlinOptions
aartiPl Aug 18, 2022
a971bad
Updated doc.
aartiPl Aug 18, 2022
4a69bed
Small updates and fixes.
aartiPl Aug 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# https://techblog.dorogin.com/case-of-windows-line-ending-in-bash-script-7236f056abe
* text=auto
*.sh text eol=lf
*.bat text eol=crlf


# Use linux file endings for kts scripts because some of them contain shebangs and are thus partially interpreted by bash
Expand All @@ -11,4 +12,3 @@
kscript text eol=lf
gradlew text eol=lf
mydsl text eol=lf

93 changes: 60 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,71 +14,98 @@ jobs:
matrix:
os:
- ubuntu-20.04
- macos-10.15
- macos-12
- windows-2022
variant:
- posix
include:
- os: windows-2022
variant: cygwin
- os: windows-2022
variant: cmd
runs-on: ${{ matrix.os }}
timeout-minutes: 30
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- uses: fwilhe2/setup-kotlin@main

- name: Setup Kotlin
uses: fwilhe2/setup-kotlin@main
with:
version: 1.6.21

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper

- name: Install dependencies for ${{ runner.os }}
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
choco install zip
# Overwrite the WSL bash.exe
cp /c/msys64/usr/bin/bash.exe /c/Windows/System32/bash.exe
# cp /c/msys64/usr/bin/bash.exe /c/Windows/System32/bash.exe
mv /c/Windows/System32/bash.exe /c/Windows/System32/wsl-bash.exe
fi

- name: Run tests
timeout-minutes: 10
- name: Run tests for Posix (and MSYS on Windows)
if: matrix.variant == 'posix'
shell: bash
run: |
# For Windows this action is running MSYS Os type

echo "OsType: $OSTYPE"
export PATH=./build/libs:${PATH}

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
gradle clean assemble test || { echo 'Compilation or Unit tests failed' ; exit 1; }

if [[ "$OSTYPE" == "linux"* ]]; then
echo "Linux test..."
./test/test_suite.sh
gradle -DosType=$OSTYPE -DincludeTags='posix | linux' integration
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "MacOs test..."
./gradlew clean build
echo "kscript path: $(which kscript)"
kscript --help
kscript -d "println(1+1)"
gradle -DosType=$OSTYPE -DincludeTags='posix | macos' integration
elif [[ "$OSTYPE" == "cygwin" ]]; then
echo "Cygwin test..."
./gradlew clean build
echo "kscript path: $(which kscript)"
kscript --help
kscript -d "println(1+1)"
gradle -DosType=$OSTYPE -DincludeTags='posix | cygwin' integration
elif [[ "$OSTYPE" == "msys" ]]; then
echo "MSys test..."
./gradlew clean build
echo "kscript path: $(which kscript)"
kscript --help
kscript -d "println(1+1)"
elif [[ "$OSTYPE" == "win32" ]]; then
echo "Windows test..."
./gradlew clean build
echo "kscript path: $(which kscript)"
kscript --help
kscript -d "println(1+1)"
gradle -DosType=$OSTYPE -DincludeTags='posix | msys' integration
elif [[ "$OSTYPE" == "freebsd"* ]]; then
echo "FreeBsd test..."
./gradlew clean build
echo "kscript path: $(which kscript)"
kscript --help
kscript -d "println(1+1)"
gradle -DosType=$OSTYPE -DincludeTags='posix' integration
else
echo "Unknown OS"
exit 1
fi

- name: Run tests specific for Windows (cmd shell)
if: matrix.variant == 'cmd'
shell: cmd
run: |
echo "Windows test..."
gradle clean assemble test
if %errorlevel% neq 0 exit /b %errorlevel%
gradle -DosType=windows -DincludeTags="windows" integration

- name: Install Cygwin (only Windows)
if: matrix.variant == 'cygwin'
uses: egor-tensin/setup-cygwin@v3

- name: Run tests specific for Cygwin
if: matrix.variant == 'cygwin'
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
echo $OSTYPE
echo "Cygwin test..."
echo "Changing directory to $GITHUB_WORKSPACE ..."
cd $GITHUB_WORKSPACE
gradle clean assemble test || { echo 'Compilation or Unit tests failed' ; exit 1; }
gradle -DosType=$OSTYPE -DincludeTags='posix | cygwin' integration
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Created with https://github.com/marketplace/actions/create-a-release

name: release

on:
push:
# Sequence of patterns matched against refs/tags
Expand All @@ -8,12 +10,9 @@ on:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release


jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -38,4 +37,4 @@ jobs:
body: |
See [CHANGES.md](https://github.com/holgerbrandl/kscript/blob/master/NEWS.md) for new features, bug-fixes and changes.
draft: false
prerelease: false
prerelease: false
34 changes: 25 additions & 9 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes

## 4.1.0 - TO BE RELEASED
## 4.1.0

Breaking changes

Expand All @@ -9,14 +9,30 @@ Breaking changes
KSCRIPT_IDEA_COMMAND -> KSCRIPT_COMMAND_IDEA
KSCRIPT_GRADLE_COMMAND -> KSCRIPT_COMMAND_GRADLE

Major Enhancements

* Initial Windows support
* Fix for resolution of dependencies

Minor Enhancements

## 4.0.2
Enhancements

* Windows support and proper Cygwin and MSys support
* File argument for specific OS should be in format of that OS (eg. Cygwin: kscript /cygdrive/c/file.kts)
* Multiplatform tests for different OS-es using Github actions
* Ability to use configuration file for kscript (thanks to [meztihn](https://github.com/meztihn))
* kscript follows XDG Spec (Issue #323) (thanks to [meztihn](https://github.com/meztihn))
* Packaging scripts works again (thanks to [Vsajip](https://github.com/vsajip))
* When creating IntelliJ project 'gradle' and 'idea' do not have to be in path
* Integration tests rewritten from bash to JUnit
* Replacements for (current annotations are deprecated):
* @MavenRepository -> @Repository
* @KotlinOpts -> @KotlinOptions
* @CompilerOpts -> @CompilerOptions
* Deprecation of comment based annotations
* Report for deprecated features (--report option)

Bugfixes
* Fix for dependency resolution
* Fix for creation of Gradle files and their indentation
* Fix for handling potentially duplicated file names in Idea projects
* Fix for Idea runtime configuration

## 4.0.x (last 4.0.3)

Released 2022-05-18

Expand Down
Loading