I'm trying to change the build properties update for liferay custom tables made with service builder.
I would like to control if the deploy has to upgrade the database or not, since now it does or does not ramdomly (apparently).
I'm trying to follow this solution: https://issues.liferay.com/browse/LPS-642 but I can't set the base.path property... Where should I put it in order to use it successfully?
In your portlet at below path
your-custom-portlet/docroot/WEB-INF/src/service.properties
Which will have below properties
##
## Properties Override
##
#
# Specify where to get the overridden properties. Updates should not be made
# on this file but on the overridden version of this file.
#
include-and-override=${base.path}/service-ext.properties
##
## Build below properties will be specific to your portlet as this file is auto generated one it is created / updated while you do ant build-service
##
build.namespace=SN
build.number=5
build.date=1379913470395
build.auto.upgrade=true
At least I found where to put my custom properties and that is in:
include-and-override=${base.path}/service-ext.properties as said before.
But... If the last deployed packet had the build.auto.upgrade=false, you change the database schema, build the services and deploy forgetting to set build.auto.upgrade=true there will be obviously no change. Then if you set build.auto.upgrade=true without building another time the services there will be another time no change, and this is why I was confused before.
Another thing to remember is that if you delete the service-ext.properties file in your project and deploy it, the old file service-ext.properties in the server will not be deleted and will continue to be used, so you have to delete it manually.
Related
So I have one local container that I want to use for the Remote-Containers support. But I can't seem to create a single default devcontainer.json to utilize this. Am I correct that it's a file per project or repository?
The idea is to have the devcontainer.json version-controlled in the repository, so that anyone checking the repo out can use the standard container configuration.
If you're cloning a 3rd party repo which you want to run locally in a container, you will need to create the config file yourself if it's missing.
If you find yourself in need of the same devcontainer config over and over again, consider submitting a pull request at https://github.com/microsoft/vscode-dev-containers.
Having said that, it should be straightforward to create the config. If you're going to use an existing Docker image it is as simple as creating a single file:
.devcontainer/devcontainer.json
{
"image": "local image name or remote url"
}
If you have a Dockerfile you want to build from, again it's a single option:
{
"dockerFile": "Dockerfile"
}
That's all you need. Fire Reopen in container VS Code command and you're set.
If you want to configure port mapping, or change the user you will need to add that of course, but anyway it will be quite minimal.
I'm building an app in React Native. I want to include a field in the settings screen which displays the build version of the app. This is because I test the app on several devices (5 different ones at the moment). A build label would therefore be useful just to be sure what bundle I'm running. The build label will basically just state the date that the bundle was built. For instance 20181201 (which would be 1st of December 2018). I can quite easily just create a constant, and update the constant manually before building a bundle. However, this relies on me remembering to update that label. It would be nice if this label was automatically generated at the time of build. Any good suggestions as to how I could achieve this in React Native?
If you write the build number you want in:
Android - app/build.gradle versionCode property
iOS - ios/[APP_NAME]/info.plist CFBundleVersion property
You can use react-native-device-info.
Check out getBuildNumber method.
I use a json file that contains information about the build. This json file is then imported and its contents are used to make a footer on the settings page, this allows me to track which build is on which device.
Personally I use Bitrise to make my builds, so in my workflow there I have a step that runs a bash script that updates the json file with specific information. i.e. date and time of build, Bitrise build number etc.
Alternatively if you don't use a CI suite like Bitrise
For iOS you could use a Pre-action in Xcode and run a script that would update the json file when you create your archive. Edit schema... select Pre-actions and then add a Run Script.
For Android you could use a custom task as explained in this SO answer Execute a custom independent gradle task in android studio
Can I use inspectdb, if so how can I use it in pycharm? I am new to django. Thanks
To run a Django command in PyCharm you should create a new configuration.
So, first of all click on Run in the top bar menu. Then click on Edit Configuration.
Now, a new window should be opened which display all your configurations. In the top-right corner you can find a plus (+) symbol, click on it and choose Django server.
In this way, you have created a new Django configuration.
Then, you should compile all information that you needed.
I think that for inspectdb command you should insert the following parameters:
Custom run command -> inspectdb
Additional options -> only if you want, if i remember well you can specify the table name
Environment variables
Python interpreter
At the end click on Apply and Ok
To run the command click on Run and choose the new command.
I'm new to composite C1 CMS and am trying to update a site from 4.1 to 4.2.
I'm running into some build errors because the 4.2 generated.dll file doesn't know about the custom data types etc that were in the 4.1 generated.dll.
Do you have to create the generated.dll manually somehow?
The Composite.Generated.dll is usually regenerated when the website restarts.
The quickest way to fix it would be to:
put the old DLL back
start the site
restart the website in IIS
If the DLL isn't updated, there should be errors in the log files
Way #2:
Delete the /bin/Composite.Generated.dll
Temporary remove DLL-s and App_Code files that were referencing classes from Composite.Generated.dll
Start and restart the website
Check the log files for errors if the file wasn't re-created
I built a small app with VS 2010 in WPF. I have used to store data in SQL lite. I have bound a dropdown field from SQL lite dataconnection.
When I run this application in VS it was worked fine. And published it as a click-once app.
I have added SQL Lite.db file to application files and it appears in Project Properties ->
Publish tab -Application Files.
I set the file's Build Action to "Content", and in
Application files, set it to "Include".
But still the dropdown field doesn't have any values.
most likely the path to database gets lost. See Accessing Local and Remote Data in ClickOnce Applications - you need to make your sqlite file as Data (not Content as you did), and use ApplicationDeployment.CurrentDeployment.DataDirectory folder as a base folder for it.