File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55This action provides the following functionality for GitHub Actions users:
66
77- Installing a version of Jython and adding it to ` PATH `
8+ - Customizing the installation path
89
910## Basic usage
1011
1617 uses : LukeSavefrogs/setup-jython@v1
1718 with :
1819 jython-version : ' 2.5.2'
20+ installation-path : ' ~/jython/' # Default
1921
2022- run : jython -c 'import sys, os; print(os.name, sys.version)';
2123` ` `
Original file line number Diff line number Diff line change 55 jython-version :
66 description : ' The version of Jython to use'
77 required : true
8- default : ' 2.7.2'
8+ default : " 2.7.2"
9+
10+ installation-path :
11+ description : ' The path where Jython will be installed'
12+ required : false
13+ default : " ~/jython/"
914
1015outputs :
1116 jython-download-url :
@@ -76,18 +81,20 @@ runs:
7681 # This is why I use the standard installation
7782 # java -jar /tmp/jython_installer.jar \
7883 # --silent \
79- # --directory ~/jython/ \
84+ # --directory ${{ inputs.installation-path }} \
8085 # --type standalone;
8186
8287 java -jar /tmp/jython_installer.jar \
8388 --silent \
84- --directory ~/jython/ \
89+ --directory ${{ inputs.installation-path }} \
8590 --type standard;
8691
8792 - name : Setup Jython alias
8893 shell : bash
8994 run : |
95+ installation_path="$(sed -r 's/^\s+//; s/\s+$//; ' <<< "${{ inputs.installation-path }}")"
96+
9097 mkdir -p ~/.local/bin;
91- echo 'java -jar ~/jython /jython.jar "$@"' >> ~/.local/bin/jython;
98+ echo 'java -jar ${installation_path} /jython.jar "$@"' >> ~/.local/bin/jython;
9299 chmod +x ~/.local/bin/jython;
93100 echo ~/.local/bin >> $GITHUB_PATH
You can’t perform that action at this time.
0 commit comments