Add provides key to some languages
Provides key allows 1 package to provide multiple languages Expect an API update to work with these new packages
This commit is contained in:
parent
3b25ec4386
commit
ccc1e4c08b
|
@ -3,21 +3,21 @@
|
|||
# Put instructions to compile source code, remove this file if the language does not require this stage
|
||||
|
||||
|
||||
case "${PISTON_ALIAS}" in
|
||||
gcc | c)
|
||||
case "${PISTON_LANGUAGE}" in
|
||||
c)
|
||||
rename 's/$/\.c/' "$@" # Add .c extension
|
||||
gcc -std=c11 *.c -lm
|
||||
;;
|
||||
g++ | c++ | cpp)
|
||||
c++)
|
||||
rename 's/$/\.cpp/' "$@" # Add .cpp extension
|
||||
g++ -std=c++17 *.cpp
|
||||
;;
|
||||
gdc | d)
|
||||
d)
|
||||
rename 's/$/\.d/' "$@" # Add .d extension
|
||||
gdc *.d
|
||||
;;
|
||||
*)
|
||||
echo "How did you get here? (${PISTON_ALIAS})"
|
||||
echo "How did you get here? (${PISTON_LANGUAGE})"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
{
|
||||
"language": "gcc",
|
||||
"version": "10.2.0",
|
||||
"aliases": ["c", "g++", "c++", "cpp", "gdc", "d"]
|
||||
"provides": [
|
||||
{
|
||||
"language":"c",
|
||||
"aliases": ["gcc"]
|
||||
},
|
||||
{
|
||||
"language": "c++",
|
||||
"aliases": ["cpp", "g++"]
|
||||
},
|
||||
{
|
||||
"language": "d",
|
||||
"aliases": ["gdc"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Put instructions to compile source code, remove this file if the language does not require this stage
|
||||
|
||||
|
||||
case "${PISTON_ALIAS}" in
|
||||
case "${PISTON_LANGUAGE}" in
|
||||
nasm)
|
||||
nasm -f elf32 -o binary.o "$@"
|
||||
ld -m elf_i386 binary.o -o binary
|
||||
|
@ -13,7 +13,7 @@ case "${PISTON_ALIAS}" in
|
|||
ld -m elf_x86_64 binary.o -o binary
|
||||
;;
|
||||
*)
|
||||
echo "How did you get here? (${PISTON_ALIAS})"
|
||||
echo "How did you get here? (${PISTON_LANGUAGE})"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
{
|
||||
"language": "nasm",
|
||||
"version": "2.15.5",
|
||||
"aliases": ["nasm64"]
|
||||
"provides": [
|
||||
{
|
||||
"language": "nasm",
|
||||
"aliases": ["asm", "nasm32"]
|
||||
},
|
||||
{
|
||||
"language": "nasm64",
|
||||
"aliases": ["asm64"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"language": "node",
|
||||
"version": "15.10.0",
|
||||
"aliases": ["node-javascript", "node-js", "javascript", "js"]
|
||||
"provides": [
|
||||
{
|
||||
"language": "javascript",
|
||||
"aliases": ["node-javascript", "node-js", "javascript", "js"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue