We have an WPF application and we versioned it at as follows:
Major Minor Build Revision
1 0 1 35
So the complete version is: 1.0.1.35.
We want to use TFS continuous integration/deployment and we want to preserve the consecutive number, i mean, the next version has to be 1.0.1.36 and so on.
But in the compilation steps we used a task to change all assembly version numbers:
The $(Buil.BuilID) value currently is 1459, so the new version number will be 1.0.1.1459.
How can we continue our next version number (1.0.1.36) and do it automatically?
You can install the Version number counter to use a variable and increment him in each build.
If you use Azure DevOps Server 2019 you can use this syntax (in a variable value):
$[ counter(variables['revision', 35]) ]
Then the variable will increment in each build.
Related
Lua 5.1.4 on SDK 3.0.1-dev(fce080e)
Trying to use node.dsleepMax() and it is returning a really smaller number (147324921). Then I tried to manually set the sleep time in node.dsleep to the 32-bit max value (4294967295) and it only remained sleeping for around 30 min or so.
Tried the following:
sleeptime = 4294967295
>
=print(sleeptime)
2147483647
which is 2^31 -1.
Also did a loop adding to a variable, and it becomes negatve when it reaches 2^31.
Questions:
Why is the variable wrapping at 2^31?
Isn't node.dsleep supposed to accept a 64-bit value with SDK 2.1 and above?
Regards,
Cesar
You already got some feedback regarding int vs. float. As for dsleep the documentation doesn't explicitly state that it accepts 64bit values but that's indeed what's happening as per https://github.com/nodemcu/nodemcu-firmware/pull/2358 (since April 2018).
In a dataset, there are 10 variables V1, V2,..., V10.
How can I select cases in which the value of any of those variables is greater or equal, say, 10?
I tried this but it didn't work:
temporary.
select if any(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, ge 10).
list id.
This and a couple of others didn't work either:
select if ((v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) ge 10).
You could use VECTOR/LOOP approach here and specifying the loop to be exited as soon as the first variable meets the given criteria, in your case variable to be greater than value of 10, so to not unnecessarily continue looping over remaining variables:
*****************************************.
* set up dummy data.
set seed = 10.
input program.
loop #i = 1 to 500.
compute case = #i.
end case.
end loop.
end file.
end input program.
dataset name sim.
execute.
vector v(10, F1.0).
do repeat v = v1 to v10.
compute v = TRUNC(RV.UNIFORM(1,12)).
end repeat.
execute.
*****************************************.
vector v=v1 to v10.
loop i=1 to 10.
if (v(i) > 10) Keep=1.
end loop if v(i) > 10.
select if Keep.
You'll have to loop for it:
do repeat vr=v1 to v10.
if vr ge 10 KeepMe=1.
end repeat.
select if KeepMe=1.
This will also work:
count cnt_ = v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 (10 thru highest).
exe.
select if cnt_>0.
exe.
The cnt_variable is used for counting how many variables have a value of 10 or greater. Then the selection command selects what you need.
Also, don't forget about execute, to apply all pending transformations. Otherwise nothing will happen.
We have a question about assembly binding redirection at compile time:
Team V (the Veterans) is developing Product P1
P1 is continuously developed by Team V in two branches (branch 1.6.x and 1.7.x), so the version from Product P1 is incrementing over time in both branches
Team NG (New Generation) has built a Product P2 based on Product P1 (using certain assemblies from P1 branch 1.7)
Product P2 contains an Assembly A2 (strongly named) that helps implementing any Product (P2, P3...) that is based on P1
Team NG created a Nuget Package for Assembly A2 (which is referring certain assemblies from P1 branch 1.7)
Now, Team NG has started Product P3 and has to use Assembly A2 from P2 and an Assembly A1 from P1
Assembly A1 from P1 is also available as Nuget Package, but in version 1.6 (because 1.7 is not approved yet for Product P3)
So Team NG has now Product P3 with two references: A2 and A1
The problem now is, that A2 refers A1 in version 1.7 but we only have A1 in version 1.6
Team NG is not allowed to use A1 in version 1.7
This is why we are looking for a binding redirect at compile time for strongly named assemblies. As far as I know (by investigations), the 'Specific Version' property has no effect when setting this for a strongly named assembly.
Is such a redirection possible or are there any other suggestions?
Many thanks in advance
Regards, Michael
The bindingRedirect element of app.config/web.config files applies to runtime only (not compile-time).
At compile-time, the compiler does not insist on references having like version numbers, unless a reference has the SpecificVersion element set to True in a project file.
Strong-naming vs. non-strong-naming shouldn't be a factor with this.
See also How exactly does the "Specific Version" property of an assembly reference work in Visual Studio?
Will this expression run the build every other Friday at noon? Assume i set this up on a Friday?
0 12 * * */14
I tried 0 12 * * FRI/14 but Jenkins returned an error.
I ma trying to run a code report job every two weeks to match scrum.
You'll have to add some logic to the build script to determine if it ran last week, and then run it every week.
I looked around similar questions for cron jobs, and you have to do some shell magic to make it work.
You could try what was suggested here:
H H 8-14,22-28 * 5
Which would qualify on Fridays that are in the second or fourth week of the month.
it will run at noon every other friday
00 12 */2 * 5
I had the same issue, the easy work around I found was to create another job that run weekly.
This job was a simple groovy script that does the following:
import jenkins.model.*;
def job = Jenkins.instance.getJob('JobNameToRunEveryTwoWeek')
job.setDisabled(!job.isDisabled())
Since Jenkins does not offer the functionnality its the best easy solution I could find. If you have better solution feel free to let me know.
One ridiculous-looking-but-it-works answer: schedule your job to run every week, and then at the top of the job add the following:
// Suppressing even number builds, so this job only runs
// every other week.
def build_number = env.BUILD_NUMBER as int
if ((build_number % 2) == 0) {
echo "Suppressing even number builds!"
echo """THIS IS A HACK TO MAKE THIS JOB RUN BIWEEKLY.
Jenkins cron scheduling currently doesn't support scheduling a
bi-weekly job. We could resort to shell or other tricks to
calculate if the job should be run (e.g., comparing to the date
of the last run job), it's annoying, and this works just as well.
Schedule this job to run weekly. It will exit early every other week.
refs:
* https://stackoverflow.com/questions/33785196/i-want-jenkins-job-to-build-every-two-weeks
* https://issues.jenkins-ci.org/browse/JENKINS-19756
"""
currentBuild.result = 'SUCCESS'
return
}
For Jenkins, you can try this approach as well.
1 1 8-14,21-28 * 5
The "W" column on the Jenkins dashboard shows stormy for all of my PHP projects due to the contributing line
Clover Coverage: Conditionals 0% (0/0)
because PHP_CodeCoverage doesn't measure conditionals. How can I make Jenkins ignore this measurement for these projects? I have tried setting <conditionalCoverage> to 0 and -1 with no effect (yes, I remembered to reload the configuration).
<hudson.plugins.clover.CloverPublisher>
<cloverReportDir>build/logs</cloverReportDir>
<cloverReportFileName>clover.xml</cloverReportFileName>
<healthyTarget>
<methodCoverage>70</methodCoverage>
<conditionalCoverage>-1</conditionalCoverage> <!-- tried 0 too -->
<statementCoverage>80</statementCoverage>
</healthyTarget>
<unhealthyTarget/>
<failingTarget/>
</hudson.plugins.clover.CloverPublisher>
Using -1 does work, but you have to rebuild each project. The entries in the summary hover are generated as part of the build and do not change.