-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode Task to create new packages #36
Comments
Ohhh, yes please. I love this |
@rimblas what do you think of just making one task that has two parameters:
This way we wouldn't need a bunch of tasks. Concern is cluttering up drop down list when multiple projects are open. |
Yes,that sound reasonable. Although, I don't see view as a burden, meaning the task is not a big time saver. |
@rimblas this is now in place. Can you please give it a try and provide your feedback? |
Files get created but I am getting the following error: > Executing task: .vscode/scripts/gen_object.sh view test2 <
sed: invalid option -- 'a'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
--debug
annotate program execution
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-E, -r, --regexp-extended
use extended regular expressions in the script
(for portability use POSIX -E).
-s, --separate
consider files as separate rather than as a single,
continuous long stream.
--sandbox
operate in sandbox mode (disable e/r/w commands).
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
-z, --null-data
separate lines by NUL characters
--help display this help and exit
--version output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
rm: /Users/xyz/GitHub/starter-project-template-2/.vscode/tasks.json-bak: No such file or directory
sed: invalid option -- 'a'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
--debug
annotate program execution
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-E, -r, --regexp-extended
use extended regular expressions in the script
(for portability use POSIX -E).
-s, --separate
consider files as separate rather than as a single,
continuous long stream.
--sandbox
operate in sandbox mode (disable e/r/w commands).
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
-z, --null-data
separate lines by NUL characters
--help display this help and exit
--version output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
rm: /Users/xyz/GitHub/starter-project-template-2/views/test2.sql-bak: No such file or directory
Created: /Users/xyz/GitHub/starter-project-template-2/views/test2.sql
Terminal will be reused by tasks, press any key to close it. |
@vitodcampanelli I think this could be a difference in our versions of sed -i -bak "s/CHANGEME_TASKLABEL/$PROJECT_DIR_FOLDER_NAME/g" $VSCODE_TASK_FILE |
Edited: Replaced image with terminal output sed: invalid option -- 'a'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
--debug
annotate program execution
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-E, -r, --regexp-extended
use extended regular expressions in the script
(for portability use POSIX -E).
-s, --separate
consider files as separate rather than as a single,
continuous long stream.
--sandbox
operate in sandbox mode (disable e/r/w commands).
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
-z, --null-data
separate lines by NUL characters
--help display this help and exit
--version output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>. |
@vitodcampanelli can you also include the exact command that you ran? Find it odd it's complaining about |
@martindsouza Here is the command
|
@vitodcampanelli what are the values for |
Ok when I run the following # Directory of this file
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "SCRIPT_DIR: " $SCRIPT_DIR
# Load helper
source $SCRIPT_DIR/../../scripts/helper.sh
echo "PROJECT_DIR_FOLDER_NAME: " $PROJECT_DIR_FOLDER_NAME
echo "VSCODE_TASK_FILE: " $VSCODE_TASK_FILE Output is: SCRIPT_DIR: /Users/xyz/GitHub/starter-project-template-2/.vscode/scripts
sed: invalid option -- 'a'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
--debug
annotate program execution
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-E, -r, --regexp-extended
use extended regular expressions in the script
(for portability use POSIX -E).
-s, --separate
consider files as separate rather than as a single,
continuous long stream.
--sandbox
operate in sandbox mode (disable e/r/w commands).
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
-z, --null-data
separate lines by NUL characters
--help display this help and exit
--version output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
rm: /Users/xyz/GitHub/starter-project-template-2/.vscode/tasks.json-bak: No such file or directory
PROJECT_DIR_FOLDER_NAME:
VSCODE_TASK_FILE: Removing the line source $SCRIPT_DIR/../../scripts/helper.sh Output has no errors but the variables blank as expected. SCRIPT_DIR: /Users/xyz/GitHub/starter-project-template-2/.vscode/scripts
PROJECT_DIR_FOLDER_NAME:
VSCODE_TASK_FILE: |
Create a new VSCode Task do to the following when run:
Paramater:
package_name
Actions:
package_name.pks
andpackage_name.pkb
(note the file name extensions are now inscripts/project-config.sh
templates
folderpackage_name
I find I'm doing this over and over again when creating a lot of new packages. It's a minor thing but could help people with new package development.
Notes:
The text was updated successfully, but these errors were encountered: