How to build a Developer version of Firefox instead of a Nightly one? - firefox

In order to build a custom version of a release of Firefox, the one without precompiled artifacts, I've done this:
hg clone -r=10 https://hg.mozilla.org/releases/mozilla-release
cd mozilla-release
hg pull -r 777777 https://hg.mozilla.org/releases/mozilla-release
# small edits; then
./mach bootstrap
./mach build
./mach package
But this has producedt a Nightly version. How do I compile a Developer version?
$ hg update developer
abort: unknown revision 'developer'
$ hg branch
default

Related

Fetched and build the code of the "release" but it's produced Nightly version

In order to build a custom version of a release of Firefox, I have done this:
hg clone -r=10 https://hg.mozilla.org/releases/mozilla-release
cd mozilla-release
hg pull -r 777777 https://hg.mozilla.org/releases/mozilla-release
# small edits; then
./mach bootstrap
./mach build
./mach package
And what has this produced eventually? The Nightly version. How can it be? I expected that the Release version would get built.
what branches? I cloned the release version only
$ hg update release
abort: unknown revision 'release'
$ hg branch
default

Replace go-swagger with another version in Windows

I am using go1.14.1 and go-swagger version dev in my Windows 10. I installed go-swagger with Installing from source.
I'd like to use go-swagger version 0.25 instead. What is the clean way of replacing dev with 0.25?
The installation process is same as for master (dev) version except you need to do one more additional step which is checking out tag v0.25.0 after cloning the repo to temporary directory:
dir=$(mktemp -d)
git clone https://github.com/go-swagger/go-swagger "$dir"
cd "$dir"
# Checkout version v0.25.0
git checkout v0.25.0
# Continue with installation, instead of
# go install ./cmd/swagger
# use this which just adds version information (current tag) and commit id to binary
go install -ldflags "-X github.com/go-swagger/go-swagger/cmd/swagger/commands.Version=$(git describe --tags) -X github.com/go-swagger/go-swagger/cmd/swagger/commands.Commit=$(git rev-parse HEAD)" ./cmd/swagger
NOTE: If you do just go install ./cmd/swagger it will technically still install v0.25.0 but swagger version subcommand will report it as dev. The version information is just a cosmetic thing passed from git repository down as content of variables in commands package and you can see how authors do it in their CircleCI config file here. Eventually you can add also other flags to get static build (but they don't do that in official Installing from source instructions).
Once done you should have go-swagger v0.25.0 installed in your $GOPATH/bin, verify with:
$ swagger version
version: v0.25.0
commit: f032690aab0634d97e2861a708d8fd9365ba77d2

how to find out which git-branch a dependency in go.mod belongs to by command-line?

I want to write a shell program to check whether all go module dependencies in my project are on newest master version in their repositories. In particular, I want to know which branch each module is on. There is a file "go.mod" containing each dependency listed as {module}-{commit time}-{commit ID}. How can I get their git-branch name from SHA-1(commit id) or other message by shell program.
I have tried go list -m -u all, only showing the newest edition if the dependency is not up-to-date. etc. git.xxx.com/project v0.0.0-20191119034146-e894bf51bdcd [v0.0.0-20200609070643-fd412b12b811]. Without cloning the repos, can go module tools resolve this quetion?
I couldn't figure out how to find which branch the current dependency belongs to using only go tools. But there is a way to find which branch the commit is on using git.
git clone <repo-url> && cd <repo> && git branch -a --contains <commit>
Reference: Finding what branch a Git commit came from

Go application version in modules

How do we add application version in go modules(NOT Dependency version)?I would like to hear from other people on this.I am not sure how to do this
Please follow this guide from the official golang blog for more details.
Let's say you're happy with the API of your module and you want to release v1 as the first stable version. To do this you need to commit latest changes and tag them:
$ git add .
$ git commit -m "feat: changes for v1.0.0"
$ git tag -a v1.0.0 -m 'some release message v1.0.0'
$ git push origin v1.0.0

Xcode Bots do not update git submodules to specified commit

My Xcode Bot is using an outdated version of my repo's submodules.
It builds old submodule code despite the submodule being updated to a new version in the commit history of the parent app.
Parent repo uses submodule v1.0.
Parent repo updates submodule to v2.0 and commits subproject commit to github.
The "on commit" Xcode Bot is run for the new commit automatically.
Parent app is uploaded to TestFlight.
TestFlight build contains the correct v2.0 submodule commit (the last commit to parent repo).
However the TestFlight build contains the outdated submodule v1.0 code.
I thought I was going crazy when my bugs were reproducible on the TestFlight build despite being "fixed" in the submodule and local builds.
It turns out Xcode Bots do not properly pull the specified submodule commit.
A simpler solution to this problem which doesn't require the server having credecentials for your git remotes - add this as a pre-integration script for your bot:
#!/bin/sh
# Enumerates each submodule to check out the desired commit.
# Needed because Xcode bots for some reason prefers to check out
# the branch head, which may result in the wrong commit.
cd "$XCS_PRIMARY_REPO_DIR"
git submodule foreach --recursive 'git checkout $sha1'
It recursively enumerates your submodules and checks out the commit expected by the parent repo.
As of Xcode 6, Xcode Bots are not guaranteed to update the repo's submodules to the specified commit.
You will need to manually update the submodules prior to the Xcode Bot's build:
git submodule update --init --recursive
To make this easier I've added updateGitSubmodules to the cavejohnson Xcode Bot scripting tool. Add the following to your Before Integration Run Script phase to update submodules automatically:
Before Integration > Run Script:
#!/bin/bash
PATH=/Library/Frameworks/Python.framework/Versions/3.4/bin:$PATH
cavejohnson updateGitSubmodules
Finally, we've opened an ticket to explore how this behavior can be fixed upstream.

Resources