Skip to content

Commit

Permalink
Aur update fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
friday committed Aug 24, 2021
1 parent ef013ba commit b725af7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions scripts/aur-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ def push_update(source):
ssh_key = os.sep.join((project_path, 'scripts', 'aur_key'))
git_ssh_command = 'ssh -oStrictHostKeyChecking=no -i %s' % ssh_key
ssh_enabled_env = dict(os.environ, GIT_SSH_COMMAND=git_ssh_command)
run_shell('git config user.email ulauncher.app@gmail.com')
run_shell('git config user.name "Aleksandr Gornostal"')
cwd = os.getcwd()
temp_dir = mkdtemp()
print("Temp dir: %s" % temp_dir)
print("Cloning AUR repo: %s" % aur_repo)
Expand All @@ -61,12 +58,16 @@ def push_update(source):
set_pkg_key('pkgver', version)
set_pkg_key('pkgrel', '1')
set_pkg_key('source', source)
print("Making a git commit")
run_shell(f'git commit PKGBUILD .SRCINFO -m "Version update {version}"')
print("Pushing changes to master branch")
run_shell('git push origin master', env=ssh_enabled_env)
os.chdir(cwd)
os.rmdir(temp_dir)
run_shell('git config user.email ulauncher.app@gmail.com')
run_shell('git config user.name "Aleksandr Gornostal"')
run_shell('git add PKGBUILD .SRCINFO')
if os.system('git diff --cached --quiet'):
print("Making a git commit")
run_shell(f'git commit -m "Version update {version}"')
print("Pushing changes to master branch")
run_shell('git push origin master', env=ssh_enabled_env)
else:
print("No changes to commit (you probably already updated this version)")


def run_shell(command, **kw):
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ build-release() {

# Upload if tag doesn't contain "test"
if [[ $(echo "$VERSION" | tr '[:upper:]' '[:lower:]') != *test* ]]; then
launchpad_upload
aur_update
launchpad_upload
fi
}

Expand Down

0 comments on commit b725af7

Please sign in to comment.