[TASK] Finish building first working release
This commit is contained in:
18
out
18
out
@@ -58,25 +58,31 @@ archive_filename_parts = archive_filename.split('_')
|
||||
|
||||
|
||||
file_hash = hashlib.sha256()
|
||||
with open(directory + '/' + archive_filename, 'rb') as f:
|
||||
with open(directory + '/' + archive_path, 'rb') as f:
|
||||
fb = f.read(BLOCK_SIZE)
|
||||
while len(fb) > 0:
|
||||
file_hash.update(fb)
|
||||
fb = f.read(BLOCK_SIZE)
|
||||
|
||||
|
||||
#aptly.files.upload(
|
||||
# config['source']['repo'],
|
||||
# directory + '/' + archive_path
|
||||
# )
|
||||
aptly.files.upload(
|
||||
config['source']['repo'],
|
||||
directory + '/' + archive_path
|
||||
)
|
||||
|
||||
aptly.repos.add_uploaded_file(
|
||||
reponame = config['source']['repo'],
|
||||
dir = config['source']['repo'],
|
||||
remove_processed_files = False,
|
||||
remove_processed_files = True,
|
||||
force_replace = True
|
||||
)
|
||||
|
||||
aptly.publish.update(
|
||||
prefix = config['source']['repo'],
|
||||
distribution = config['source']['distribution'],
|
||||
force_overwrite = True
|
||||
)
|
||||
|
||||
print(json.dumps({
|
||||
'version': {'version': archive_filename_parts[1]},
|
||||
'metadata': [
|
||||
|
||||
Reference in New Issue
Block a user