Skip to content

Commit

Permalink
Merge pull request #605 from ekohl/fix-bins
Browse files Browse the repository at this point in the history
Work with Modulesync 1.0.0
  • Loading branch information
ekohl authored Nov 29, 2019
2 parents 4fbd4b0 + bbeed6c commit 2b21efa
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ group :release do
end

gem 'puppet_forge', '>= 2.2.9'
gem 'modulesync', '>= 0.10.0'
gem 'modulesync', '>= 1.0.0'
gem "octokit", "~> 4.0"
# vim: syntax=ruby
2 changes: 1 addition & 1 deletion bin/clean-git-checkouts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

for module in modules/* ; do
for module in modules/*/* ; do
(cd $module
git status
git reset --hard
Expand Down
2 changes: 1 addition & 1 deletion bin/clean-git-checkouts-nondestructive
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

for module in modules/* ; do
for module in modules/*/* ; do
(
cd "${module}" || exit
echo "${module}"
Expand Down
6 changes: 2 additions & 4 deletions bin/clean-metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
import os
import glob
import json

# Note range is exclusive so the last number is not in the list
Expand All @@ -17,9 +17,7 @@ UNSUPPORTED = {
'Ubuntu': {str(i) + m for i in range(4, 18) for m in ('.04', '.10')} - {'16.04'},
}

for mod in os.listdir('modules'):
filename = os.path.join('modules', mod, 'metadata.json')

for filename in glob.glob('modules/*/*/metadata.json'):
print('Reading {}'.format(filename))

with open(filename) as fp:
Expand Down
2 changes: 1 addition & 1 deletion bin/count-unreleased-commits
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

for module in modules/* ; do
for module in modules/*/* ; do
count=$(git --git-dir "${module}/.git" log "$(git --git-dir "${module}/.git" describe --tags --abbrev=0)"..HEAD --oneline | wc -l)
printf '%-40s %3d\n' "$module" $count
done
2 changes: 1 addition & 1 deletion bin/create-pull-requests
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if ! which hub > /dev/null ; then
fi

version=$(git describe)
for module in modules/* ; do
for module in modules/*/* ; do
(cd "$module"
hub pull-request -m "modulesync ${version}"
)
Expand Down
11 changes: 6 additions & 5 deletions bin/set-travis-secret
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ def cli(filename, modules):
with open(filename) as secrets_fp:
secrets = yaml.load(secrets_fp)

modulesync = yaml.load(Path('modulesync.yml').read_text())
namespace = modulesync['namespace']

if not modules:
with open('managed_modules.yml') as managed_modules:
modules = yaml.load(managed_modules)
modules = yaml.load(Path('managed_modules.yml').read_text())

modules_path = Path('modules')

for module in modules:
path = modules_path / module / '.sync.yml'
path = modules_path / namespace / module / '.sync.yml'
try:
with path.open() as sync_fp:
sync = yaml.load(sync_fp)
sync = yaml.load(path.read_text())
except FileNotFoundError:
sync = {}

Expand Down

0 comments on commit 2b21efa

Please sign in to comment.