Skip to content

Commit 39779fe

Browse files
committed
Merge branch 'dev'
2 parents f59e4f5 + 50edda3 commit 39779fe

File tree

8 files changed

+220
-78
lines changed

8 files changed

+220
-78
lines changed

Cargo.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "git-credential-github"
33
authors = ["ldev <ldev at ldev dot eu dot org>"]
4-
version = "2.1.0"
4+
version = "2.2.0"
55
license-file="LICENSE.md"
66
edition = "2021"
77
description="A simple git credentials helper for github"
@@ -10,11 +10,12 @@ description="A simple git credentials helper for github"
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
clap = {version = "4.4", features = ["default", "cargo", "derive"]}
14-
reqwest = {version = "0.11", features= ["json"]}
13+
clap = {version = "4.5", features = ["default", "cargo", "derive"]}
14+
reqwest = {version = "0.12", features= ["json"]}
1515
serde = {version="1.0", features=["derive"]}
1616
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
17-
shlex = {version= "1.2.0"}
17+
shlex = {version= "1.3.0"}
1818
log = {version="0.4"}
19-
thiserror={version="1.0.50"}
20-
stderrlog = {version="0.5"}
19+
open={version="5.1.2"}
20+
thiserror={version="1.0.58"}
21+
stderrlog = {version="0.6"}

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 ldev
3+
Copyright (c) 2024 ldev
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

packaging/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
src/
2+
pkg_deb/
3+
pkg_choco/
24
pkg/
35
*.deb
46
*.tar.gz
7+
*.nupkg

packaging/PKGBUILD

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
pkgver=2.1.0
1+
pkgver=2.2.0
22
pkgrel=1
33

44
pkgname=git-credential-github
55
pkgdesc="A simple git credentials helper for github"
66
license=('MIT')
77
url="https://github.com/Xgames123/$pkgname"
88
maintainer="ldev <ldev dot eu dot org>"
9+
maintainer_short="ldev"
10+
tags=(git-credential-github git git-credential github gh-login gcm)
911
section="vcs"
1012
arch=('any')
1113

@@ -47,6 +49,11 @@ check() {
4749

4850
package() {
4951
cd "$srcdir/$pkgname-$pkgver"
50-
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$binname"
51-
ln -s "/usr/bin/$binname" "$pkgdir/usr/bin/git-credential-gh-login"
52+
if [ "$os" = "choco" ] ; then
53+
cp -f "target/release/$binname" "$pkgdir/tools"
54+
else
55+
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$binname"
56+
ln -s "/usr/bin/$binname" "$pkgdir/usr/bin/git-credential-gh-login"
57+
fi
5258
}
59+

packaging/choco/LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2023 ldev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

packaging/choco/VERIFICATION.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
VERIFICATION
2+
Verification is intended to assist the Chocolatey moderators and community
3+
in verifying that this package's contents are trustworthy.
4+
5+
I am software vendor

packaging/makepkg_choco.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
# NOTE: this is designed to run under wsl on windows
3+
os="choco"
4+
5+
#aliases
6+
function cargo() {
7+
cargo.exe $@
8+
}
9+
function choco() {
10+
choco.exe $@
11+
}
12+
#end aliases
13+
14+
source ./PKGBUILD
15+
16+
root="$PWD"
17+
18+
echo "TODO: fix me"
19+
srcdir=$PWD/../src
20+
lfjsl
21+
pkgdir=$PWD/pkg_choco/$pkgname
22+
23+
mkdir -p $pkgdir
24+
mkdir -p $pkgdir/tools
25+
26+
echo "Generating nuspec"
27+
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
28+
<package xmlns=\"http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd\">
29+
<metadata>
30+
<id>$pkgname</id>
31+
<version>$pkgver</version>
32+
<packageSourceUrl>$url</packageSourceUrl>
33+
<owners>$maintainer_short</owners>
34+
35+
<title>$pkgname</title>
36+
<authors>$maintainer_short</authors>
37+
38+
<projectUrl>$url</projectUrl>
39+
<iconUrl>http://rawcdn.githack.com/Xgames123/$pkgname/$pkgver/logo.png</iconUrl>
40+
41+
<projectSourceUrl>$url</projectSourceUrl>
42+
<tags>$tags </tags>
43+
<summary>$pkgdesc</summary>
44+
<description>$pkgdesc</description>
45+
</metadata>
46+
<files>
47+
<file src=\"tools\\**\" target=\"tools\" />
48+
</files>
49+
</package>
50+
" > $pkgdir/$pkgname.nuspec
51+
52+
echo "Copying static choco files..."
53+
cp choco/* $pkgdir/tools
54+
55+
echo "RUNNING prepare()"
56+
prepare
57+
58+
echo "RUNNING build()"
59+
build
60+
61+
echo "RUNNING package()"
62+
package
63+
64+
cd $pkgdir
65+
choco pack
66+
cd $root
67+
68+
mv $pkgdir/$pkgname.$pkgver.nupkg $pkgname.$pkgver.nupkg
69+

0 commit comments

Comments
 (0)