Is there a way to reference the last build label of a project in CruiseControl.NET? - cruisecontrol.net

Is there a way to reference the last build label of a particular project in CC.NET? I have a project set to execute a task that needs to run only when Force Build is clicked, but the path of the working directory changes based on the build number of our main trunk.
Currently I have a workaround where we set an environment variable to the value of %ccnetlabel%, but this seems like a dirty way to do it, and I am curious to know if there is a way to refernce the build label of a project directly.
We are running CC.NET 1.4.4.49.

I found out that with 1.4.4.49 there is not a way to reference another project's build label. I got around this by adding the following XML to the project configuration:
<labeller type="stateFileLabeller">
<project>Other-Project-To-Take-Build-Number-From</project>
</labeller>
What had happened was that once I figured out that %ccNetLabel% was actually the correct way to go about this, I tried just using it in this new project (we use %ccNetLabel% elsewhere which works fine). However, without specifying the labeller tag, %ccNetLabel% causes CC.NET to throw an exception saying that '%' was not expected.

Related

Is it possible to edit ng generate?

I was wondering if I could customize what would ng generate for angular does. For example, if I want to generate a component, I would like the command to automatically edit my routes file and automatically add a new link based on what was written. Or for another example, I want to use a set of services to be included in my newly-generated component.
This solution would solve the problem of me going around, and importing each individual service to any new component that I am going to generate. So is there any way that I could modify the behavior of the ng generate command or even do some additional things on top of what it does?

How Do We Update Xcode for Changes to a Doppl Project?

Suppose we have an Android project with Doppl integrated. We set up the Xcode workspace via pod install, write some Swift, and everything is working fine.
Now, we add a method to a Java class that is part of the Doppl translation, such as a unit test class. We run dopplBuild (with Xcode closed for safety), reopen the Xcode workspace, and everything is working fine, including the new method.
However, when we try changing the mix of classes, that flow (dopplBuild, reopen Xcode) appears to be insufficient. For example, if we add another unit test class (including adding it to dopplConfig), our test runner can't find it. If we remove a class from translatePattern and testIdentifier, and are no longer referring to it from our code, the Xcode build fails because it thinks that class should still be there.
What should we be doing to get Xcode to know about these bigger changes?
Run pod update. While you do not appear to need this for the smaller changes (adding/removing methods, changing method implementations), you do need it when you wind up adding or removing classes from what you had previously.
Also note that pod update does not change anything else, such as any dopplTests.txt file that you may have copied into your workspace. You will need to update those separately yourself by hand.

how to debug a file in node_modules

I'm new to node and am playing around with SailsJS. I found what I think is a bug (reported it), but I wanted to have ago at debuging it myself.
I located the file that I need to investigate in the node_modules folder.
I tried putting a console.log in it to ensure I had the right one. Nothing happened.
So I tried placing log statements in several other files in node_modules that are at the top of the dependency tree. Nothing is printing out.
Do I need to do something to refresh the cache make this work? OR am I going about this in completely the wrong way!
Usually, if you think that an external module has a bug, the best approach is to clone it and write a test that shows which is the offending set of inputs.
SailJS is available on GitHub, so you can freely and easily contribute with a merge request if you find that you are right.
This way, you can adopt the same approach used by the project to test the code (as an example, using mocha).
In case the merge request will be accepted, while waiting for a new release on npm you can refer to your remote copy by means of the package.json file.

android-support-v7-appcompat has same attrs as actionbarsherlock library

I'm trying to get chromecast integration in my app but I'm having build issues when I add the android-support-v7-appcompat to my project. Basically it has an attrs.xml file that has the same values as the actionbarsherlock attrs.xml file. Is there anyway around this? This seems kind of ridiculous that different libraries can possibly conflict resource values.
I just encounter the same problem and had a hard time for several hours figuring this out. this is how I solved it.
You usually need support-v7-appcompat if your minimum sdk supported is below API14.
I removed support-v7-appcompat as my library. (This will show error regarding missing theme.)
For all the styles.xml in all folders (mine are) values, values-v11 and values-v14
style name="AppBaseTheme" parent="Theme.AppCompat.Light"
replace it with
style name="AppBaseTheme" parent="android:Theme.Light"
for some reason, in my menu xml file. it had error for android:showAsAction. I was able to solve it by deleting it then save and then copying the same thing from another file i have because I want that function. (Really weird it was just the same text.)
I did my sherlock code adjustments needed for my app
I am now able to run actionbar in 2.3.3

MonoDevelop: Any way to override resources / classes using projects?

Consider a solution has 2 projects: ProjectA and ProjectB (both are MonoTouch apps) and ProjectBase. ProjectBase contains the whole application, but Main.cs file (with the entry point) is located in ProjectA and ProjectB (which reference ProjectBase). This way, running any of A/B projects will boot up the application from ProjectBase.
Now, I want to override something for ProjectA only (it might be XIB file, image or a .NET class). Is there any way I can setup the solution so that the code and resources, produced by ProjectBase, are merged with the ones from ProjectA/ProjectB and the latter wins?
I found (probably a quirky and kinda-undefined-behavior-driven way) of overriding XIBs: I just put a XIB into ProjectA and ProjectB, name it the same as it was named in ProjectBase and them exclude it from ProjectBase. Although MonoDevelop compiles all items, it seems that the startup project's XIBs get priority, so that I see ProjectA-specific XIBs when I launch ProjectA and ProjectB-specific XIBs when I launch ProjectB. However, I am not sure it is the way it should behave, plus, from what I can see from build log, ALL projects get built yielding resources at the end.
P.S. I'm sorry if this has been asked previously, but I was not able to find the similar question on SO.
I was once trying to do this for a bunch of apps. I would have thought build order would be ProjectBase and then ProjectA, and the content copy system would be the same... Guess this means we are wrong.
You could do a few things.
A) Build your own program to copy resources which are marked for content. Would not be very hard, just need to read the .csproj files. XML parsing is easy enough in .NET. Run this program on post build. Would just have to be careful when doing builds such as to zip or to the device as I am not sure how it handles post-build events.
B) [This is what I did instead] If I expect to also make ProjectC, ProjectD ... ProjectN I instead made a program to generate my program... (Programception).
What it does, has ProjectBase, and ProjectTempalte. You enter your new project name into this program, say, "MyNewProject" and it will create the correct folder structure, write the correct csproj files, and update SLN file. ProjectTemplate has various placeholders in .csproj files like {PLACEHOLDER} which Programception would just go through and find/replace with my project name. Image files (and in your case XIB) are then only kept within ProjectA (B..C..N) unless I do not expect to try and override them in which case they would stay in ProjectBase. This is a lot easier with a XIBless application I would assume. I never use XIB's anyway.
Hope that helps!

Resources