is there any conan variable which can show the directory path of scm_source or code project root folder? - conan

as we know, gitlab ci provided a variable ${CI_PROJECT_DIR}, which shows the path of the git code project root folder on ci.
so is there any variable same as above which provided by conan to show the project root path or scm_source path on local?

Related

.nuxt folder vs dist folder in a spa nuxt project

every time i build my nuxt project it creates a .nuxt folder and a dist folder in my root directory. what's the difference between them? i can run .nuxt by nuxt start command, but what's use of dist folder? i served it with a chrome extension and it worked fine. but i don't know what exactly it is. it's not a static version cause it's different from dist folder that nuxt generat command produce.it's fully interactive and when i run it by that extension i can't see any difference compare to runing .nuxt folder by nuxt start command.

Apache server cannot find local file [duplicate]

I'm working on a Flask extension from which I want to create a directory in the project's root path on the file system.
Suppose we have this directory structure
/project
/app
/tests
/my_folder
manage.py
my_folder should be created dynamically by the extension, which is a test utility and wraps the application under test in the /tests directory. However, I'm struggling to determine the project's root path within my extension.
For now, I am trying to guess the path from the run file:
def root_path(self):
# Infer the root path from the run file in the project root (e.g. manage.py)
fn = getattr(sys.modules['__main__'], '__file__')
root_path = os.path.abspath(os.path.dirname(fn))
return root_path
This obviously breaks as soon as the tests are run from within the IDE instead of the manage.py. I could simply infer the project's root relative to the app or tests directory, but I don't want to make any assumptions regarding the name or structure of these directories (since multiple apps might be hosted as subpackages in a single package).
I was wondering if there is a best practice for this type of problem or an undocumented method which the Flask object provides (such as get_root_path).
app.root_path contains the root path for the application. This is determined based on the name passed to Flask. Typically, you should use the instance path (app.instance_path) not the root path, as the instance path will not be within the package code.
filename = os.path.join(app.instance_path, 'my_folder', 'my_file.txt')
app.root_path is the absolute path to the root directory containing your app code.
app.instance_path is the absolute path to the instance folder. os.path.dirname(app.instance_path) is the directory above the instance folder. During development, this is next to or the same as the root path, depending on your project layout.

Archive localResource in YARN : customize location

I wanted to deploy a zip file as a local resource in yarn. Hence I did:
packageResource.setResource(packageUrl);
packageResource.setSize(packageFile.length());
packageResource.setTimestamp(packageFile.lastModified());
packageResource.setType(LocalResourceType.ARCHIVE);
packageResource.setVisibility(LocalResourceVisibility.APPLICATION);
If my file name is "abc.zip", Yarn unpacks all the zip contents into a folder called "abc", not the current working directory.
For example, it creates something like:
/grid/5/tmp/yarn-local/usercache/(user)/appcache/application_1394223910537_2533883/container_1394223910537_2533883_01_000002/abc
Can I customize this behavior? How do I get Yarn to unzip a file in the current working directory ,instead of creating a new directory?
The use-case is: if my app has some scripts, it would be useful to have all scripts deployed to current directory, instead of having to change the code to reference them from within the folder that Yarn creates.

Get the closest path that have a config.rb file in file watcher plugin

I recently installed the file watchers plugin, and I must configure it to use compass to compile my sass files.
My current config is:
Program: compass
Arguments: compile
Working dir:
Env vars:
output:
How can I target the closest path to(upward folder tree) config.rb file within scss`s parents folders?
I need it to put in "Working dir:" field
My paths are
scss:
projects/<gitrepo>/<project>/<module-name>/static/<same-module-name>/scss/common/main.scss
css:
projects/<gitrepo>/<project>/<module-name>/static/<same-module-name>/css/common/main.css
config.rb are in:
projects/<gitrepo>/<project>/<module-name>
Module name and folders under scss may vary.
Thanks
I'm using the following solution:
Create a compass project in your Idea project folder by this command in your idea project folder:
compass create --css-dir <your css dir here> --sass-dir <your SASS dir here>
this will create a config.rb in the root of your idea project (this is important). You can learn more about possible options calling compass create --help.
Set up the following setting for SASS/SCSS file watcher
Scope: project files
Program: compass.bat
Arguments: compile $FilePathRelativeToProjectRoot$
Working directory: $ProjectFileDir$
Environment variables: --empty--
Output paths to refresh: --empty--
Please note that ruby bin folder is in my PATH environment variable.

where is bin directory in rails3?

I am trying to place the wkhtmltopdf executable in the "bin directory" of my rails project so that it works with heroku, as mentioned here.
dumb question....where is the "bin" folder in the rails project? I placed the executable in root of my executable, however, heroku gives an error saying:
No wkhtmltopdf executable found at /app/bin/wkhtmltopdf-i386
And the following code is used to provide path for wkhtmltopdf
config.wkhtmltopdf = Rails.root.join('bin', 'wkhtmltopdf-i386');
You need to create the bin folder under the app/ folder and add it in there.
mkdir app/bin