21 Commits
Author SHA1 Message Date
Tudor Marcu 6c1c038896 Release v3.1.0
This release adds fixes to remove unsuccessful curl download files,
merges the git helper functions into a generic one to use for all future
git commands, and rewrites the cmd-line code to a more maintainable and
extensible implementation.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-08-24 15:30:18 -07:00
Caio Marcelo de Oliveira Filho 01bb863c3f Call check dependencies before doing work
Changed it to be a function in main.go instead of a method since it
wasn't using anything related to the Builder struct.

Minor tweaks to make code more idiomatic: avoid i for the non-index
variable in range, return an error instead of printing the error and
boolean.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-24 15:13:24 -07:00
Caio Marcelo de Oliveira Filho 149c17434a builder: remove the Get method
The method (and use of reflect package) is unnecessary when we are
using a literal string as argument.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-24 15:13:24 -07:00
Caio Marcelo de Oliveira Filho 4270a98458 Move command implementation to their own functions
Instead of having the flag specification, flag parsing, and command
processing in three different parts of the main function, move the
whole code for each command to its own function.

This patch also fixes the issue that build-all was always using the
default values of the flags, since the build-update specific flags
were not being added to its FlagSet. The problem was hard to see
because all commands shared the same scope.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-24 15:13:24 -07:00
Caio Marcelo de Oliveira Filho 90baf5a7b4 Avoid interface{} when not needed
Create a New variant that takes a configuration and returns a Builder
instead.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-24 15:13:24 -07:00
Caio Marcelo de Oliveira Filho 966ad1a646 Provide a help (and -h) command
Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-24 15:13:24 -07:00
Tudor Marcu c2e09da997 Update comments to account for future use
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-08-24 14:59:34 -07:00
Caio Marcelo de Oliveira Filho 738910ecf3 Merge git helper functions into one
And also dump the Stderr of the command to os.Stderr. Without a git
failure might not give enough information about what gone wrong,
e.g. when trying to call "git commit" without a user.email configured.

The commit message was changed to include the Clear version from which
the Mix was based off.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-24 14:55:41 -07:00
Caio Marcelo de Oliveira Filho 9c21172ea4 When HTTP download fails, don't keep the file around
Only create the file if the HTTP connection succeeds, and in case of
failure later on during download, remove the partial file.

This let the user retries the operation, otherwise the empty/partial
file will prevent the download. One of such cases is forgetting to set
the https_proxy.

Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
2017-08-23 15:23:51 -07:00
Tudor Marcu f5c5726562 Release v3.06
This release fixes mixer to use absolute path for certificates so that
it can be run from different directories other than the workspace.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-08-09 14:31:21 -07:00
Tudor Marcu d56bec40d7 Use absolute path for certificates
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-08-09 14:31:14 -07:00
Tudor Marcu 8cb61dff16 Release v3.05
This release updates the name of the release tarball to 'mixer-tools',
and adds better validation to the version file reading.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-06-19 11:54:50 -07:00
Tudor Marcu 2698d5017e Strip newline from version files
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-06-19 11:45:58 -07:00
Tudor Marcu ed401599ff Release v3.04
This release changes add-rpms to hardlink instead of copy if possible,
speeding up the operation when there are many local rpms, and falls back to
a regular copy if hardlinking fails.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-05-25 14:14:47 -07:00
Tudor Marcu c2990fc2b7 Hardlink rpms when calling add-rpms
To save time on copying fullfiles, just make a hardlink from the files in
RPMDIR to the REPODIR.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-05-25 14:15:30 -07:00
Patrick McCarty 29f23c710e Ensure update-ca directory is created
Starting with swupd-client v3.8.3, the update-ca directory is no longer
created for the build, so the cert copy is failing. Fix the issue by
creating the directory before the copy operation.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2017-03-14 11:15:11 -07:00
Tudor Marcu 78460c05c9 Release v3.02
This release enables the build-all option which will generate all content
for a mix; this means: chroots, all update content (manifests, packs, etc),
and auto-increments the mixversion number so it can be run consecutively
without any user intervention between mixes.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-03-03 14:12:50 -08:00
Tudor Marcu ad408edaef Add build-all option to generate all content with one command
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-03-03 14:10:46 -08:00
Tudor Marcu eb891fece0 Release v3.01
This release enables auto-increment for builds and fixes a dependency error
in pack-maker.s

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-03-03 11:51:03 -08:00
Tudor Marcu 2b47ca4e0b Add auto-increment flag to build-update
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-03-03 11:49:15 -08:00
Tudor Marcu b671aba659 Introduce new mixer tool
The tools have been converted from many bash scripts into a single binary,
written in Go. This creates a codebase that is much easier to edit and
maintain, and a single tool that provides all the functionality needed. The
interface is more intuitive and easy to use as it provides options and menus
for each subcommand.

Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
2017-03-01 01:50:41 -08:00