What is .rds_delta file? - widget

I see a file in the root folder of my Tizen project called .rds_delta that contains what appears to be change commands for something. A Google search reveals nothing. Does anyone know what this file is for and if it should be kept in the Git repository, or should we add this to .gitignore?
.rds_delta file:
#delete
#add
#modify
res/wgt/author-signature.xml
res/wgt/config.xml
res/wgt/signature1.xml

It was a file that inform application installer what is changed in your app between one package build and second one. This is needed to quick application install from SDK.
Some official link: https://developer.tizen.org/development/training/native-application/application-development-process/running-applications
In my opinion it shouldn't be throw into Git repository.

Related

GitHub Actions checkout#v3: where is repo downloaded?

I am working with GitHub Actions to build code on Windows, Linux, and MacOS. I use actions/commit#v3 #actions/checkout#v3 to download my repo to each server. However, I do not know where the repo gets downloaded. I have to curl other files and add them to the repo folder for the build to work.
Does anyone know where repos are downloaded on each server (Windows, Linux, and MacOS) with actions/commit#v3 #actions/checkout#v3? I'm having trouble finding anything in the documentation. If the path is set in an environment variable, I would prefer to use that instead of hard coding the path for each server.
The environment variable you're looking for is GITHUB_WORKSPACE.
The default working directory on the runner for steps, and the default location of your repository when using the checkout action. For example, /home/runner/work/my-repo-name/my-repo-name.
Source: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

Can I use opam to make a package out of a local file and install it?

I'm new to opam and trying to figure out how to use it properly. For a class, I want to set up students with an environment that has some custom packages installed. (The package will consist of some raw .ml files that I got from a colleague at another school; the files are on their github but there's no .opam file that I can see, and as far as I know they're not in any official package release.)
Can I somehow call these local .ml files a package and ask opam to install it? Do the files have to be on github first, and if so can I use my colleague's existing repository as the source? I don't want to make any of this public, since it is not my own work; I just want to configure my local environment so that the code in the files can be included easily as a package. Basically I don't know the best way to proceed so I'm happy for any advice.
You can add a custom opam file in the base directory of the project. See the documentation for how to create that file.
Then you can enter opam pin add . in the base directory and your project will be installed as if it was an opam package. Check opam pin --help for more info (you can also pin to a remote git project for instance).
Note that though the default repository is hosted on github, this is in no way a requirement for opam. Opam is dependent on git but you can absolutely use it with a private git repository. If you want to use your colleague's repository as the source, that is totally doable though it is often preferable to have the opam file at the root of the directory (you can do a PR on their repository or make your own fork of it on github, the site makes it clear you copied the code).
If pinning is not to your taste, you can also create your own repository though this is probably a bit too heavyweight for your needs.
Good luck!

Firebase not running index.html file

I'm a pretty new programmer going through the Firebase tutorial. I have gone through steps 1-5 of the tutorial (https://codelabs.developers.google.com/codelabs/firebase-web/#5). I've added the "Add Firebase to your web app" js code to the html file, and set up the Firebase CLI. However, when I run the firebase server, everything seems to work other than it is not showing the code from the index.html file.
I am in the right directory, and my console says "Server listening at: http://localhost:5000." But, at localhost 5000, it shows a generic "Welcome to Firebase Hosting: You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!" box rather than the app interface code in the index.html file. It is the only html file in my directory. It seems like I am missing something very simple. Thank you for your help.
The website shown to you is the index.html from your public folder (or whatever you configured it to be in your firebase.json file).
The culprit might be firebase init. It tries to generate a generic index.html file for you. However, in the latest version, it should at least ask you whether or not to override (which it did not in the past!).
The problem is firebase init being unbelievably crude. It just overrides the index.html file that was in your public folder... no confirmation, no safety net, no nothing.
If you lost, or accidentally let firebase init overwrite, your index.html file, you have to re-produce it somehow. If you do not have a backup of or other means of re-producing your index.html file... well... too bad!
How does the firebase CLI work?
Generally, the steps of a firebase setup go a little like this:
firebase login
firebase init
your-build-command-here # (if you have a build pipeline)
firebase deploy
You only need to do Step #1 (login) the first time when you setup building on that machine (or maybe when a new firebase revision has been released)
You only need to do Step #2 (init) to initialize a new project. That is, when you don't have your firebase.json yet (which will be created by the init command).
To re-deploy, it's simply:
your-build-command-here # (if you have a build pipeline)
firebase deploy
I figured out my answer. The index.html file that was being posted was in the "public" file, which was created during the "firebase init" stage. I replaced that placeholder html file with the one for my app.
Firebase hosting not showing up app?
There might be two reasons for this problem
1st step:
Make sure your public folder (define in your firebase.json) 'dist' containing the index.html hasn't been modified by firebase init command, if yes replace it with your original project index.html
for reference (dist is standard but your may different)
{ "hosting": { "public": "dist"} }
2nd step:
Make sure to configure your base href in project's index.html
as
<base href="https://["YOUR FIREBASE PROJECT NAME"].firebaseapp.com/">
and other bundle files as
<script type="text/javascript" src="https://["YOUR FIREBASE PROJECT NAME"].firebaseapp.com/runtime.a66f828dca56eeb90e02.js">
<script type="text/javascript" src="https://["YOUR FIREBASE PROJECT NAME"].firebaseapp.com/main.2eb2046276073df361f7.js">
3rd step run command - firebase deploy
enjoy ! ;)
New projects
when doing firebase init select the directory which contains the index.html as the public directory.
Existing projects
update firebase.json with
"hosting": {
"public": "dist/directoryThatContainsIndexHtml",
......
}
Edited Original Answer: Available in edit history. Only for testing purposes.!! for production, use the updated version. Contents of dist are rewritten on each build so anything you place #dist are gone each time you build.
For anyone else comming across this.
Try launching in incognito mode - the browser was cached for me.
https://stackoverflow.com/a/56468177/2047972
first of all you need to check your index.html after deployment of project. after these command steps:
firebase login
firebase init
firebase deploy
your real index.html file might be overwrite by firebase generic file that's why the problem is occurred. so change code of index.html after deployment of project. if you see this box on your web page
Tip: copy your complete project anywhere in your PC before deployment.
otherwise check your directory for file path your path of index.html is must correct.
In my case when I run the command ng build --prod it created a sub folder under dist folder. Assume my project name is FirstProject. I can see a sub folder called FirstProject inside dist folder (dist/FirstProject).
Give dist/[subDirectory] as your public directory
What do you want to use as your public directory? dist/FirstProject
This solved my issue
For deploying Angular application to Firebase simple and quick tutorial
you can find here.
During the process of firebase init, type N, when the question
"File dist/index.html already exists. Overwrite?" appears, and your page will be displayed as it should be.
In public folder option write dist/your-folder-name.
This will allow you to render your index file which is in your folder.
npm install -g firebase-tools
firebase login
firebase init
firebase deploy
firebase open
Select the following after scrolling down
Hosting: Deployed Site
When you build your Angular app, at least with Angular 10, by default Angular creates a folder names dist, containing a folder having the name of the application. For example, this example’s app is named blog-front, so when building the project (ng build or ng build -- prod), Angular will create a folder dist, containing a folder named blog-front:
When you reach the firebase init step asking the public directory, your folder's name should be “dist/blog-front” for this example, or “dist/yourApplicationName” as a general rule :
In my case firebase was using the wrong directory, also see here: firebase CLI didn't recognize the current project directory for 'firebase init'. While I was expecting firebase to put all created files into my project directory it was totally disconnected and put all files into my /Users/MyUserName directoy and deploying the wrong index.html from there.
This is how to fix it (no reinstall of firebase needed as suggested in the linked post):
delete all created firebase files from /Users/MyUserName directoy (.firebaserc, firebase.json, index.html and dist-folder)
run firebase init on project directoy
use dist/projectname as public directory
Configure as a single-page app "Yes"
do not overwrite index.html (if you do, make sure to "ng build" again before deploying)
firebase deploy
By the way, for everyone who is using Angular 7, this tutorial about deploying an angular 7 app to firebase hosting was really helpfull to me.
I faced similar situation. When we run firebase init it asks couple of questions. At that time we mention the directory path from where firebase will take all files to deploy.
Make sure that, directory contain index.html.
Delete the index.html which is present in dist folder.
Then run the following commands:
firebase login
ng build --prod
firebase init
firebase deploy
This Worked for me
First Stop the project and follow these steps
npm install -g firebase-tools
firebase login
firebase init
? Are you ready to proceed? Yes
? Which Firebase CLI features do you want to set up for this folder? Press Space to select features, then Enter to confirm your choices. Hosting: Configure and deploy Firebase Hosting sites
? What do you want to use as your public directory? dist
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
After initialization is completed makesure to delete the created dist file before next steps
ng build --prod
firebase deploy
You are seeing this error because you didn't run the command:
npm run build
make sure you use it before firebase deploy
and also make you are incorrect directory.
execute this after finishing firebase init process.
If you get a public folder with ready index.html by firebase init. You can simply replace that index.html with yours and use the command:
firebase deploy
That should be enough to get it working. Make sure all the files are where they should be!
Working Solution
Just do
flutter build web, then
flutter deploy.
firebase init tries to generate a generic index.html file for you, and if it did that, then you first have to do flutter build web so that the index.html you need is generated, rather than the generic one, and then again flutter deploy
Please follow the step
npm install -g firebase-tools
If you already have a dist folder, remove it from directory
firebase login
ng build --prod
firebase init
firebase deploy
index.html file has that firebase default information.That's why it is showing that information. Copy and paste index.html from your original angular file and paste it to dist index.html. This fixed my issue.
You should add your files to public directory folder before deploy it into firebase server(your app's index file should be there).
My solution is just waiting a bit.
Then, if it still not working.
let try:
Solution 1: check your index.html inside "build" folder and index.html in your own project. They should be the same, if not, copy code index.html outside "build" folder and paste into index.html inside "build" folder.
solution 2 : delete your .firebase folder. and init it again.
=> firebase init
? What do you want to use as your public directory? build < == NOTE: "build" is my directory
? Configure as a single-page app (rewrite all urls to /index.html)? No <== select NO
? File build/404.html already exists. Overwrite? No <== select NO
? File build/index.html already exists. Overwrite? No <== select NO
After doing these things, I also get that notification of "Welcome Firebase Setting Host Complete" , and I just wait for a while. then reload the website.
Changing the default HTML page name in the public folder to index.html worked for me.
Also, make sure you do not rewrite the index.html when firebase prompts you to in the firebase init step(follow the attached image).

My intellij java project can't find misc.xml

I have a java project in Intellij and use Hg/Mercurial for version control. I ignored some files with this .hgignore file
syntax: glob
target/*
.idea/*
*.iml
and deleted all these files which was committed before. but now I can't execute my project, cause it can not find the file misc.xml.
What should I do?
Updated answer for IntelliJ 14+: File-> New-> Project from Existing Sources... (choose your project directory) and follow the wizard Q&A.
Restarting Intellij should fix the problem. Just make sure you click on the "Import Project" pop-up that appears on the top right.
At first, you shouldn't really ignore everything under .idea but instead only .idea/workspace.xml and .idea/tasks.xml, as it JetBrains states: http://devnet.jetbrains.com/docs/DOC-1186
To solve your problem and get your project back to working state there are possibly two solutions:
Checkout the last commit that contains the files under .idea folder with
hg checkout SHA,
where SHA is the commit id.
After that reset your working space to the head:
hg reset HEAD
Edit your .hgignore in the way that was recommended before, add project files to stage, and commit them:
hg commit -am "Reverted project settings"
If there is no commit with the project settings, you can just import your code back.
Start Intellij IDEA and choose "Import Project". Choose the folder with your code, and choose the appropriate SDK after.
I met this problem when I did rm -rf project command, then when I git clone a new project to my working space, maybe quit the idea and then import the project again. This can easily solve this
I have found that for this error and also for some other cases where the IDE project behavior is inconsistent with command line behavior, the following often helps: close the project's Intellij IDEA window, delete .idea/, and open the project again. IntelliJ often flashes up a message saying it didn't find a project root but generally this disappears after a few seconds and IntelliJ automatically rebuilds the .idea directory.
Recreating the .idea folder
File -> Close project
File -> Open -> Choose pom.xml under the project folder -> Open as project -> Delete existing project and import

Jenkins MSTest Issue

I have configured Jenkins as the CI for a project which is using Mercurial as the source control management. I'm using MSTest plugin in Jenkins to see the test results and I have written a bat command to generate test result file
del results.trx
mstest /testcontainer:Example\TestProject1\bin\debug\TestProject2.dll /resultsfile:results.trx
it gives an error in console saying File "Example\TestProject1\bin\debug\TestProject2.dll" not found"
when every build happens a folder is created under %WORKSPACE% having a new name (SYSTEM_My_Computer_Name 2011-06-08 13_04_11). In that the test dll is in a directory called out. How can I get path to that dll, because the directory name is changed for every build?
It is working fine when I used a absolute url like "c:\Example\TestProject1\bin\debug\TestProject2.dll"
How can we refer the newly built dll ?
Do I need to add test dll file in to the repository ?
Jenkins run bat files with %WORKSPACE% as the current directory.
As the error message indicates, the relative path to the test container is wrong. I can think of two things that can be the issue here:
The folder structure under %WORKSPACE% does not match your relative path. Adding a cd by its own in the bat file will reveal on the build output where this is. You can also use the links in the Jenkins web ui to browse the workspace.
You are building a different msbuild target in Jenkins, for example release. Then \bin\debug might not exist.
The folder "SYSTEM_My_Computer_Name 2011-06-08 13_04_11" is not created by Jenkins during the build, but it is created by the mstest when it is running the test. The root folder when the mstest is invoked is the workspace root folder, so the testcontainer file should be specify from the workspace root.
For example, say if the dll file is under C:\jenkins\jobs\\workspace\TestProject1\bin\debug\TestProject2.dll(assume your jenkins is installed under c:\jenkins).
The command should be (relative to the workspace root folder):
mstest /testcontainer:TestProject1\bin\debug\TestProject2.dll /resultsfile:results.trx