Skip to content

Commit bd9fd83

Browse files
committed
Merge remote-tracking branch 'origin/v2' into v2
2 parents 9d05a04 + b1e86fb commit bd9fd83

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/go.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
types: [created]
66

77
jobs:
8-
release-linux-amd64:
9-
name: release linux/amd64
8+
release:
9+
name: Build and release
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
@@ -16,15 +16,14 @@ jobs:
1616
exclude:
1717
- goarch: "386"
1818
goos: darwin
19-
- goarch: arm64
20-
goos: windows
2119
steps:
2220
- uses: actions/checkout@v2
23-
- uses: wangyoucao577/go-release-action@v1.22
21+
- uses: wangyoucao577/go-release-action@v1.28
2422
with:
2523
github_token: ${{ secrets.GITHUB_TOKEN }}
2624
goversion: 1.17
2725
goos: ${{ matrix.goos }}
2826
goarch: ${{ matrix.goarch }}
2927
binary_name: "CFExporter"
30-
pre_command: "sed -i 's/${VERSION}/${{github.ref_name}}/g' main.go"
28+
pre_command: "export CGO_ENABLED=0 && sed -i 's/${VERSION}/${{github.ref_name}}/g' main.go"
29+
ldflags: "-extldflags=-static"

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ out/
66
test/
77

88
*.exe
9+
10+
.DS_Store

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module CurseForgeExporter
22

3-
go 1.17
3+
go 1.18
44

55
require (
66
github.com/aviddiviner/go-murmur v0.0.0-20150519214947-b9740d71e571

main.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ func genOverrides(missingFiles []int64, folder string) {
172172
}
173173

174174
if len(missingFiles) > 0 {
175+
pterm.Debug.Println("Adding missing files to overrides:", missingFiles)
175176
if _, err := os.Stat(path.Join(tmpDir, "overrides", folder)); os.IsNotExist(err) {
176177
err := os.Mkdir(path.Join(tmpDir, "overrides", folder), os.ModePerm)
177178
if err != nil {
@@ -205,7 +206,7 @@ func genOverrides(missingFiles []int64, folder string) {
205206
func extraIncludes() {
206207
includeProgress, _ := pterm.DefaultProgressbar.WithTotal(len(buildConfig.Includes)).WithTitle("Adding extra includes to overrides").Start()
207208
for _, include := range buildConfig.Includes {
208-
if include != "mods" || include != "resourcepacks" {
209+
if include != "mods" && include != "resourcepacks" {
209210
includeProgress.UpdateTitle("Adding: " + include + " to overrides")
210211
fToInclude := path.Join(*instanceDir, include)
211212
fi, err := os.Stat(fToInclude)
@@ -227,6 +228,8 @@ func extraIncludes() {
227228
pterm.Error.Println("Failed to copy file:", err)
228229
}
229230
}
231+
} else {
232+
pterm.Debug.Println("Skipping", include)
230233
}
231234
includeProgress.Increment()
232235
}

0 commit comments

Comments
 (0)