I use athens from docker , this is my Dockerfile
FROM gomods/athens:latest
ENV ATHENS_DISK_STORAGE_ROOT=/var/lib/athens
ENV ATHENS_STORAGE_TYPE=disk
ENV HTTP_PROXY=http://ss-local:1080 # because I from china , I need a proxy to get golang.org.
ENV HTTPS_PROXY=http://ss-local:1080
ENV NO_PROXY=git.secok.com
ENV ATHENS_FILTER_FILE=/root/filterfile.conf
ADD ./filterfile /root/filterfile.conf
and my filterfile:
+ git.secok.com/cad/common
git.secok.com is a internal git server
then I want to use this command GOPROXY=http://<athens-ip> go get -u -v git.secok.com/cad/common
command execute success,and I check my go.mod.
I want to get a new version for this repo , but I only get athens's cache , nothing to update.
Is this expected behavior?
@qqqasdwx
I want to get a new version for this repo , but I only get athens's cache , nothing to update.
What do you mean by new version? Did you create a new tag in git.secok.com/cad/common or do you want to get the latest commit?
If it's a tag, was it a new major version or minor or patch?
The -u flag will instruct go to fetch the latest minor or patch version so if there isn't any it won't update the version.
In general, you could run go get without Athens and check if there's any difference.
@qqqasdwx
I want to get a new version for this repo , but I only get athens's cache , nothing to update.
What do you mean by new version? Did you create a new tag in
git.secok.com/cad/commonor do you want to get the latest commit?
If it's a tag, was it a new major version or minor or patch?
The-uflag will instruct go to fetch the latest minor or patch version so if there isn't any it won't update the version.
In general, you could run go get without Athens and check if there's any difference.
thanks reply~
yes, I want to get the latest commit, and this repo is not a go mod repo, when I set GOPROXY='' and run go get -u -v git.secok.com/cad/common, I get the latest commit and auto update my go.mod.
like this
git.secok.com/cad/common v0.0.0-20190514043600-709bfcbc1b43
@qqqasdwx
So the problem is that Athens serves only the first commit that has been saved and doesn't update it even though there are newer commits?
Is it similar to the issue described in #1000 ?
Could you post here Athens logs after running GOPROXY=http://<athens-ip> go get -u -v git.secok.com/cad/common?
Thanks!
@marpio
Yes, it similar to #1000
And I'm afraid I can't provide Athens log, because I change my repo to a mod repo and set tag with my commit. Now, I run GOPROXY=http://<athens-ip> go get -v git.secok.com/cad/common and I got the my lastest commit. I think this is the right way to use it, is it?
Thank you very much for your help.
@qqqasdwx
Yes, this is the right way to use it.
So, just to be sure - it's working fine now, right?
@marpio
Yes, it's working fine now!
Most helpful comment
@marpio
Yes, it's working fine now!