Add the version to the package tarball name so that nightlies have unique names

add a make target for building arduino nightly packages
pull/1000/head
Jesse Vincent 4 years ago
parent a2090029a8
commit 6be7b2b388
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -109,3 +109,13 @@ clean:
$(SMOKE_SKETCHES): force $(SMOKE_SKETCHES): force
$(MAKE) -C $@ -f $(KALEIDOSCOPE_ETC_DIR)/makefiles/sketch.mk compile $(MAKE) -C $@ -f $(KALEIDOSCOPE_ETC_DIR)/makefiles/sketch.mk compile
build-arduino-nightly-package:
perl bin/build-arduino-package \
--kaleidoscope-tag=master \
--version `date +%Y.%m.%d%H%M%S` \
--index-filename-slug=kaleidoscope_nightly \
--only-one-platform-revision \
--push \
--output-repo=https://github.com/keyboardio/arduino-kaleidoscope-nightly

@ -29,7 +29,7 @@ my $only_latest_platform = 0;
my $bundle_repo = 'https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio'; my $bundle_repo = 'https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio';
my $boards_repo = 'https://github.com/keyboardio/boardsmanager'; my $boards_repo = 'https://github.com/keyboardio/boardsmanager';
my $push_package_repo = 0;
@ -39,8 +39,8 @@ my $boards_repo = 'https://github.com/keyboardio/boardsmanager';
"output-repo=s" => \$boards_repo, "output-repo=s" => \$boards_repo,
"index-filename-slug=s" => \$index_filename_slug, "index-filename-slug=s" => \$index_filename_slug,
"version=s" => \$version, "version=s" => \$version,
"only-one-platform-revision" => \$only_latest_platform "only-one-platform-revision" => \$only_latest_platform,
) "push" => \$push_package_repo)
or die("Error in command line arguments\n"); or die("Error in command line arguments\n");
my $index_filename = 'package_'.$index_filename_slug.'_index.json'; my $index_filename = 'package_'.$index_filename_slug.'_index.json';
@ -49,7 +49,7 @@ if ( $version eq '' && $tag =~ /^v(\d.*)$/ ) {
$version = $1; $version = $1;
} }
my $checkout_dir = "Kaleidoscope-$tag"; my $checkout_dir = "Kaleidoscope-$tag-$version";
my $filename = $checkout_dir . ".tar.bz2"; my $filename = $checkout_dir . ".tar.bz2";
my $build_base_url = $boards_repo."/master/builds/"; my $build_base_url = $boards_repo."/master/builds/";
@ -145,9 +145,13 @@ chdir('boardsmanager');
`git add $index_filename`; `git add $index_filename`;
`git add builds`; `git add builds`;
`git commit -a -m 'Built by $executed_as'`; `git commit -a -m 'Built by $executed_as'`;
if ($push_package_repo) {
`git push`;
} else {
print print
"Now, you need to cd to $temp_dir/boardsmanager check the content and push it\n"; "Now, you need to cd to $temp_dir/boardsmanager check the content and push it\n";
}
sub set_plugin_versions { sub set_plugin_versions {

Loading…
Cancel
Save